This question is not really about coding, but about choosing the right method for the task. I don't know if this is against SO rules, but here you go.
I once created a small CMS for a local newspaper that gave them the functionality of adding my posts along with a photo. As for the photo, they used to upload one photo, and I saved various versions of this photo for maintenance according to the different templates that they can choose (templates, not screen sizes!)
Now I was asked to upgrade this old system, and I was faced with the dilemma of responsiveness / adaptability.
As for my results on the Internet, the next big thing is the <picture> element. I found a lot of resources, and when I decided to go for it, I came through this site. If you look at the source of any image, you will understand that it has a request, for example width=940&height=320&mode=crop&scale=both&meta=panoramic When I resize the window, it becomes something like width=300&height=200&mode=crop&scale=both&meta=square&anchor=topcenter I believe this website uses the "Image Resizer" , and depending on the screen size, one photo is processed by the server on the fly to display a new image.
I don’t understand which of these methods is actually better, since the picture element still needs several images uploaded to the server, while imageresizer only needs one, and it will drop - it resizes to fit the screen size. But, on the other hand, with the picture element, the server does not get bombarded with requests for resizing images, but serves to save existing photos from processing and time?
source share