I have a very simple question that I would like to ask those who has a much better knowledge than I do.
The basis of the question is. When developing a mobile website. Should I dynamically resize the images that I get from external sources to be smaller. Or should I leave them as big images and handle it with css?
The Mobile website I am building pulls a lot of images from a webservice as base 64. Now my train of thought is this. I want to keep the size of my website as small as possible, thus resizing the images to be smaller seems to be a good idea.
On the other hand. Resizing the images with javascript, (lead developer wants everything done client side only...), might cause overhead for the user's mobile device.
What are your opinions on this matter. Should I resize the images or not ?
Thanks in advance for your answer.
On mobile devices, images get resized by the browser anyway, and that 1500px size is enough to look crisp on smartphones with high-PPI “retina” screens too.
The best image resolution for most smartphones is 640 by 320 pixels, although you should ideally maintain the aspect ratio of the original image or the output image will be distorted.
2400x1600px, jpeg, saved for web, and optimized To ensure that your full width images look good across any device big or small the recommended size is 2400x1600px. Note that devices have different ratio than the one you shoot and it is possible your images will be cropped when viewed on web.
Always be mindful of the mobile user's connection. Latency is often much higher on a mobile connection (so try to limit the overall number of requests, regardless of size), transfer rates are slower, and overage charges tend to be expensive.
In most cases the best solution is to serve an image that is roughly the size needed by the browser. Size "tweaks" in the browser are fine. Serving a somewhat larger image will allow for higher-quality zoom, but you should use this judiciously (does the image actually need to show more detail when zoomed?)
Also be mindful of the server-side expense of resizing the image every time it is requested. It's better to size once and then persist the result either to a cache or to a database.
Facebook takes this approach. As of 2009, they were generating and storing four different versions of each image.
If you must consume the full-size images in the mobile browser, at least try to lazy load them so that they are only downloaded when needed (e.g. when they are first scrolled into view).
The best approach I know - to use on of the existing Responsive Images solution.
I.e.:
Your could choose the one which is better for your. It depends on project.
If you have only mobile website - provide smaller images for it and save time and traffic for your users. If you can't - just scale it by css.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With