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
Reduce the size of the original uploaded files (advice) #1340
Comments
You could use php script with GD or imagemagic commands or php script to do that: |
I believe you can simple add quality to the images being stored. Look at On Sat, Nov 28, 2015 at 10:50 AM, Łukasz Szczepański <
Sincerely, |
The code seems to be located here:
I was thinking that there should be an option on the admin size to configure maximum size of the images and then on the upload do the resize automaticaly based on the previous setting. What do you guys think? |
Although I basically support the idea, I don't like the solution you're suggesting, @csrui Resizing usually also reduces quality, too, and loss of quality is sometimes undesired. I would suggest a combined solution that serves all cases, by creating additional, "preview" images and still keeping the original image in case it is later needed, e.g. when somebody clicks on the preview images. Also, I would advise against fixed sizes for preview images. Think of mobile devices and what so-called responsive image can/must do today. With device ranges from low-budget Android phones over retina-depth pixels on iPad to demos running on a presentation screen: the age of fixed-size images is over, one resolution can't serve all the needs. |
It does reduce quality but I believe that it should be an administrative option. The system should generate N configurable sizes from the main image to use as @rondonjon notes. Using img srcset, several sizes could be available for different resolutions and such. Keeping the original fullsize image is another option all together :) |
Let me start by stating that limiting the size of the uploads is not a good option as many users don't know or have the tools to do so.
The uploads folder size can get out of hand really quick so I would like to script something to reduce the size of the original images in the background with a cronjob. I would like to ask for advice on how to do this. Should I do this as a module (If so any reference link where I can start looking) or as a standalone script to upload somewhere?
Sugestions welcome.
The text was updated successfully, but these errors were encountered: