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

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Nor4a created an issue. See original summary.

gnuget’s picture

Status: Active » Needs review

Hi!

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.

meles’s picture

patch for FilterImageLinkToSource.php
Have some mistake on line
$element->setAttribute('class', 'cboxElement');
change to
$element->setAttribute('class', 'colorbox');

nick_obukhov’s picture

FileSize
1.25 KB

I correct #3 as discribed.
Note: you should install colorbox_load module for working the patch with filter "Link images derivates to source".

robcarr’s picture

Can't seem to get this patch to work. Doesn't seem to be adding 'colorbox' class to the hyperlink generated by image_resize_filter

alfaguru’s picture

Colorbox has now been deprecated. See https://www.drupal.org/project/image_resize_filter/issues/3260829 for a possible basis of alternative solutions.