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

Resize large images to conserve storage #83

Closed
manuerwin opened this issue Feb 5, 2024 · 4 comments
Closed

Resize large images to conserve storage #83

manuerwin opened this issue Feb 5, 2024 · 4 comments

Comments

@manuerwin
Copy link

manuerwin commented Feb 5, 2024

The app currently seems to allow any size image to be uploaded (I was able to upload a 35MB sample image see #84).
Suggest automatically resize large attached images (to 1920p max?) to conserve storage space.

@manuerwin manuerwin changed the title Resize images to conserve storage Resize large images to conserve storage Feb 5, 2024
@scastiel
Copy link
Member

scastiel commented Feb 6, 2024

Assuming we can limit the upload file size, I don’t think it is worth resizing the images, at least for the S3 upload.

@manuerwin
Copy link
Author

manuerwin commented Feb 6, 2024 via email

@justcallmelarry
Copy link
Contributor

Was just thinking that cameras often take large images where smaller resolution one would likely suffice for viewing. For example, imagine all 20,000 existing expenses had a 1MB image => 20,000MB => 20GB Auto-resizing to a max resolution “should” conserve storage in the long term I think?

Just adding a comment that you can achieve this type of functionality by running a lambda that resizes images for you (based on S3 events or MinIO equivalent), without it having to be a part of the app.

Unless I'm mistaken, it seems like the images never pass the backend with the current solution, so adding some sort of resizing is not a minor change.

@manuerwin
Copy link
Author

I like this approach @justcallmelarry, thanks for the input :)

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

3 participants