DEV Community

Discussion on: Optimize Images to Reduce Page Weight: File Formats, Tools and RWD

Collapse
 
borisschapira profile image
Boris Schapira

What feature does SPIF provide that srcset does not already? Moreover, srcset let you change only one version of your image without invalidating others in cache.

Collapse
 
kayis profile image
K

True.

But doesn't srcset require you to change it if you add new resolution/sizes, while SPIF would simply require to replace the image file?

Thread Thread
 
borisschapira profile image
Boris Schapira

Yes, it does but that's not an issue if your webpage size is smaller than your image size (which is often the case).

Thread Thread
 
kayis profile image
K

Ah okay, I saw it more from the perspective of code changes vs asset changes.