Forum for discussing general topics related to Couch.
2 posts Page 1 of 1
Hi couch fam,

I was trying to find on the documentation here if there's any plugin or way for couchCMS to manage a single uploaded image and put it on the server with multiple versions with diferent sizes so that it can be used for responsive features like:

<img
src="https://url.com/imageA.jpg"
srcset="https://url.com/imageA-320w.jpg 320w,
https://url.com/imageA-640w.jpg 640w,
https://url.com/imageA-960w.jpg 960w,
https://url.com/imageA-1280w.jpg 1280w,
https://url.com/imageA-1920w.jpg 1920w,
https://url.com/imageA-2560w.jpg 2560w"
sizes="(min-width: 1024px) 25vw, (min-width: 768px) 50vw, 100vw"
width="1920"
height="1080"
alt="">

Couldn't find a solution. Anyone has a suggestion or opinion on this?
Thank you so much
Friend, you can either define a few fields that auto-create copies of the uploaded image with different sizes — see https://docs.couchcms.com/tags-referenc ... bnail.html

OR if Admin does not need to manage those copies in Panel, you simply use <cms:thumbnail> tag in code — see https://docs.couchcms.com/tags-reference/thumbnail.html — as this tag first checks the presense of auto-created image copy, so will basically work just once, as the page is accessed the first time ever.

I am really surprised you missed that part of documentation :)
Join COUCH:TALK channel here https://t.me/couchcms_chat
Donate to support my efforts to help the community https://boosty.to/trendo/donate
2 posts Page 1 of 1