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.
And other missing feature is - if I have resized the image in the wysiwyg editor, then when viewing the content and clicking on the resized image - colorbox opens and shows the original image...
I know it was possible with Drupal 7 but I cannot figure out how to do it in Drupal 8
Comment | File | Size | Author |
---|---|---|---|
#4 | 2839831-filter-image-link-to-source.patch | 1.25 KB | nick_obukhov |
Comments
Comment #2
gnugetHi!
In the D8 version, there is another filter called "Link images derivates to source" this basically adds a link in the image pointing to the original.
Let me know if this helps you.
Comment #3
meles CreditAttribution: meles commentedpatch for FilterImageLinkToSource.php
Have some mistake on line
$element->setAttribute('class', 'cboxElement');
change to
$element->setAttribute('class', 'colorbox');
Comment #4
nick_obukhov CreditAttribution: nick_obukhov as a volunteer and commentedI correct #3 as discribed.
Note: you should install colorbox_load module for working the patch with filter "Link images derivates to source".
Comment #5
robcarrCan't seem to get this patch to work. Doesn't seem to be adding 'colorbox' class to the hyperlink generated by image_resize_filter
Comment #6
alfaguru CreditAttribution: alfaguru at Figure W Limited commentedColorbox has now been deprecated. See https://www.drupal.org/project/image_resize_filter/issues/3260829 for a possible basis of alternative solutions.