StaticJsCMS / static-cms

A Git-based CMS for Static Site Generators
https://staticjscms.netlify.app/
MIT License
595 stars 52 forks source link

Image caption field in Media Library #830

Closed colmoneill closed 9 months ago

colmoneill commented 1 year ago

Thanks for all the great work on Static CMS, very much enjoying using it!

Wondering if there is a plan to have a caption field along with individual media objects in the Media Library. Since it is possible to select multiple pictures with the image widget, I'm looking to build a gallery/lightbox section on a website but need the ability to show individual image captions, as well as needing it as an alt= attribute for accessibility purposes.

If there is a better approach to this, I'd be keen to try it.

Thanks again and all the best.

denyskon commented 1 year ago

Wouldn't it be easier to make a list, with each Item containing an image field, a caption field and an alt text field?

colmoneill commented 1 year ago

Thanks for this idea. Yes this could work, however, the intention is to reuse the same media object in different articles, where I would hope to be able to access the same caption.

Your solution would work, but would be very individual to specific collections.

Cheers!

anthonykasabian commented 1 year ago

I think it's a good way, that's how I solved it in several projects. To put the caption in the meta of the image. In hugo you can read those tags with $image.Exif.tags.description

I think it's a matter of organizing things in common. But in a convenient way we're getting images from the authors wich manage them on their systems with tools like bridge or lightroom. Maybe that's a roundtrip for you.