I created this question in order to clarify doubts that I have developed over the months in relation to images and space.
While accessing sites, either on my cell phone or my normal computer, I have observed that SVG or encoded images using base64 are loaded faster than normal 1 images, I realize this mainly when my internet is slow.
Since then, I carry this doubt in my head, which is the most advantageous to use in terms of storage space (for the benefit of the server) and at the same time has faster loading (for the benefit of the end user).
In my projects that use a lot of images, such as a social network, which loads avatars images etc, I use these steps as an alternative to try to help the server without disturbing the final result:
When the image is "up", it reduces the size (measures x,y
) that I determine and decreases the quality to not take up space on my server.
To display it to the end user, within <img
I make the image go through a thumb that cuts the image according to my need, without losing the original quality, with automatic resizing.
I think the answers to this question will go a long way towards not only me, but the general public and future web sites, thus helping everyone.
1 Normal images: .png
, .gif
, .jpeg
etc ..