Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Captions for images. We can add a caption field to the image bundle of the file entity, and for now use some custom code to display it on node view. This will only work on the main images at present, but in future (when Media 2 is ready) we should make it work for all images, even those in wysiwyg fields.
We also need a media module patch to enable a reasonable editing workflow for entering captions on node edit forms.
Comment | File | Size | Author |
---|---|---|---|
#2 | add-caption-to-main-image-field-2161701-2.patch | 1.19 KB | dnotes |
#1 | add-caption-to-main-image-field-2161701-1.patch | 1.85 KB | dnotes |
Comments
Comment #1
dnotes CreditAttribution: dnotes commentedThe first patch was causing other media fields to fail; the lack of a caption field was messing with the javascript. This has now been fixed.
Comment #2
dnotes CreditAttribution: dnotes commentedWith the new editing features of media 2.x we may not need this, but I don't have time to completely test it tonight.
Comment #3
dnotes CreditAttribution: dnotes commentedYep, done a while ago. Need to migrate to field on media entity for 8.x.