Problems, need help? Have a tip or advice? Post it here.
4 posts Page 1 of 1
hello - I'm trying to implement a more responsive gallery based on masonry style thumbnails combined with a lightbox slideshow and am going to use img/srcset for the first time. I'm using Couch's gallery upload functionality.

I'm wracking my brain to try to get round the issue of landscape and portrait images. If I specify a width of say, 1200 for the large size for a landscape photo, this would mean that a portrait image would be much larger than required.

Do I have to forego the use of the gallery upload in order to set up multiple image upload editable regions e.g. for large landscape (w: 1200), large portrait (w: 800) and smaller portrait and smaller landscape (w: 640)?

Does anyone have any ideas? If necessary it'll mean uploading gallery images one by one I guess?!
Doesn't the browser choose on client which size to load with srcset? Also, is your masonry same-width for all thumbnails?
Also, I've read in docs, that one can use cms:exif and read orientation of the main image.. With available info it's easy to decide on size of thumbnails to add to srcset list..
hi trendoman, I am more thinking about the Admin Panel and the uploading of images in order to create those different sized images in order for the browser to pick the best size of image according to the screen size. If I use Couch's gallery functionality I believe that I can only create one image on the mass upload - gg_image, and therefore just one width of image. What I'd like is on upload of an image to generate a number of other associated images of different sizes - all ready for the srcset tag. Hope that makes my conundrum clear(er)!
potato wrote: on upload of an image to generate a number of other associated images of different sizes

Your best bet is multitude of editables type 'thumbnail' with parameter assoc_field. https://docs.couchcms.com/tags-referenc ... bnail.html Add as many editables as dimensions are needed..
4 posts Page 1 of 1
cron