Last post Jul 26, 2015 11:24 AM by Rion Williams
Jul 26, 2015 11:10 AM|sitby|LINK
I'v read that images should be optimized before being uploaded to a website to reduce memory waste.
The user can upload images on my website but then I resize them to a specific size using CSS, e.g. thumbnail size, so I presume this is bad as I think it's taking webpage longer to load. Should I just carry on this way or do I need to put a warning to users
to only upload certain dimensions although this doesn't seem user friendly.
Any tips would be great.
Jul 26, 2015 11:24 AM|Rion Williams|LINK
Generally, you would want to handle resizing the images after they are uploaded and then saving them on the server as opposed to using CSS, which would serve the full-sized image (and load the full sized image) and just resize it, which would be terribly
By reducing it after its uploaded, you could reduce the size overall and it would serve images out faster to the user and save you some bandwidth on your site. If you need a specific library that you could use something like
Should I just carry on this way or do I need to put a warning to users to only upload certain dimensions although this doesn't seem user friendly.
If you handle resizing after uploading then you wouldn't need to prompt the user, you could just automatically resize the image to a certain size on the backend.