DEV Community

Pacharapol Withayasakpunt
Pacharapol Withayasakpunt

Posted on

What are good ways to optimize images from Markdown?

Especially when you generating images from

  • Hotlinking (which probably you shouldn't do)
  • Pasting from clipboard

This is an example of such pasting function,

So, what do you recommend I do?

  • Proxy with Cloudinary?
  • Make my own proxy server?
  • Save image locally, then parse to multiple sizes (probably with sharp)?
    • Are there some guidelines on how to do this?
  • Or, just use a headless CMS?

Top comments (4)

Collapse
 
souksyp profile image
Souk Syp.

ImageKit.io

Collapse
 
patarapolw profile image
Pacharapol Withayasakpunt

At a first glance, how different is it from Cloudinary?

Also Cloudinary seems to provide Components for popular frameworks as well, such as cloudinary-vue.

Collapse
 
souksyp profile image
Souk Syp.

ImageKit has unlimited requests an transformations (but weird limited storage). See imagekit.io/plans. Pair it with S3 or B2 maybe?

Else you have statically.io I found recently on dev.to which is mostly a free CDN maintained by Frans Ellen (he's a dev.to user). I forgot to asked him about privacy concerns though...

Collapse
 
souksyp profile image
Souk Syp.

As for components integration, I think you can handle it yourself.