What is the proper way to handle images on a responsive website?
My understanding was that in the past you would take your base image, and scale it to a couple different sixes using Photoshop. So maybe you would have 300x300, 200x200, 100x100, and 50x50 pixel images. Then your HTML/CSS would choose the appropriate sized image for the device.
In an earlier thread here, I believe that someone suggested this CSS…
As I see it, the problem with that second approach is that you are stuck with the original file-size even if you are adjusting its size in the browser. For example, if your original image was 800x800 and 1MB in size, even if you use CSS to shrink that image down to 100x100 for a smartphone, you would still be serving up a 1MB file, correct?
We recently had a party at work, and I want to build a super simple site to display the photos. The pictures I took average over 1MB in size, and I would like to have a way for people to download the original high-quality pictures, but for the gallery I am building, I want thumbnails that are smaller and that people can view whether on a desktop or their smartphone, and so I figured I should some here and get a better understanding of the correct way to do responsive photos!
Well, first thing, if you’re displaying thumbnails to start you’re not going to have to download the large images till they are requested.
Also, if you optimise your images they should be a lot smaller than 1MB. I have several 1200 x 1600 images which when optimised are about 200 - 300 KB.
But what I was asking is a.) should I have multiple version of thumbnails and display them depending on device?
Maybe 200x200 for a desktop, but 100x100 for a smartphone?
Follow me?
And if so, then do I do that by just having a 200x200 picture and shrinking it with CSS for mobile, or do I use CSS to display a 200x200 image or a 100x100 image depending on the device?
Thanks, but this is a home-grown site, so no plugins.
If anyone knows the answer to my question that would be the most helpful.
Restated, I recall in the past that you’d have 3-4 versions (i.e. sizes) of your photos and serve up the appropriate size per device.
If you just use CSS to resize things, you get the right sized image, but you will be choking mobile devices with a larger file size.
Maybe for this mini project, I can just take the original larger file, resize it in some software to make a thumbnail that will work on any sized device and call it quits.
But I would like to understand if the approach I mention above is still used, and also understand how to tackle this topic for larger sites like the e-commerce site I am working on.