After ages I have decided to optimize the images on my store, to do so I have download the
media folder and
compressed all the images with Caesium leaving the original folder structure.
The first run left the extension unchanged, I have obtained a good file size reduction, but I have also tried to change the extension to see if any improvements can be obtained(if the size is bigger than the original, then the image is skipped): the result was a further reduction of 44Mb.
Now my problem/doubt is how can I upload back all the images and register the extension change? My first guess is to edit the table that stores these information, but
I have no idea how the Magento framework store/manage these data. Is it better to avoid this kind of procedure?