Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TODO in OpenCiviWiki/project/accounts/models.py #1515

Open
gabeschreiber opened this issue Feb 13, 2025 · 6 comments
Open

TODO in OpenCiviWiki/project/accounts/models.py #1515

gabeschreiber opened this issue Feb 13, 2025 · 6 comments
Assignees

Comments

@gabeschreiber
Copy link

Hello, I was looking through code files for this project and noticed a TODO comment from a few years ago for the resize_profile_image method in the User class, I would like to work on this if this issue still needs addressing. Please let me know. Thank you!

@brylie
Copy link
Member

brylie commented Feb 14, 2025

Thanks! What does the TODO comment describe? That might give us some idea of what the task will entail.

@gabeschreiber
Copy link
Author

Thanks! What does the TODO comment describe? That might give us some idea of what the task will entail.

TODO: try to remove this resize_profile_image method

or find a more simple way to acheive the goal(s)

- less disk space?

- desired shape?

Basically it was to simplify or eliminate the method by combining it into another.

@brylie
Copy link
Member

brylie commented Feb 14, 2025

Good to know. What do you think about how the function can be simplified or any alternative approaches?

We can ignore the disk space and desired shape questions. That way, we can focus on whether there is a more simple way to implement image resizing.

@gabeschreiber
Copy link
Author

I was thinking you might be able to use django-imagekit to do the same resizing/processing for the thumbnails for you, but I'm a little unsure on how to integrate an app like that into a project of this scale so I might need some guidance on that. Another thing I though was there might be a way to integrate the process into the save function in the same file. Save calls resize_profile_image and I was thinking you combine them and eliminate the need for resize_profile_image.

@gabeschreiber
Copy link
Author

I've never used ImageKit but the documentation looks pretty good online and it seems like a good application for it. Let me know what you think! Thank you :)

@brylie
Copy link
Member

brylie commented Feb 17, 2025

Sounds good 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants