DEV Community

Discussion on: CDN & optimization for images weight: a free tool

Collapse
 
rsedykh profile image
Roman Sedykh

and use their JS plugin to automatically replace your image URLs.

Correct me if I'm wrong, but using JS to generate images for each resolution on the fly has its downside. If you don't have src="URL" in your <img> tag, them screenreaders won't see it. It's not good for SEO, afaik.

From their quick start:

Step 3: Replace your img tags fromsrc="[image source]" to ci-src="[image source]"

You might want to use srcset instead, and generate all necessary links (//token.cloudimg.io/operation/size/filter/original_image_urloperation, size, filter) before it's fetched to the browser.