After setting up this module I can create a node with one or more inline images and after saving it everything works as expected. I am very happy with this module!

However when I edit the node (changing text for instance) and than save the node the content of data-responsive-image-style is set to "" and the image is not picked up by the filter. The only remedy is to edit the node, click on the image properties of all images separately and re save them, then save the node.

Comments

jzp74 created an issue. See original summary.

afoster’s picture

This is probably a duplicate of https://www.drupal.org/node/2802013 - Turn of Twig debugging to confirm. If you images re-appear than apply the patch.

jeroen_vreuls’s picture

Status: Active » Needs review
StatusFileSize
new1.88 KB

I also have this issue. I find it only happens when you have either a caption enabled for the image or have set the alignment to center. You can quickly check the bug by toggling to source code mode in the editor. Once you've done that, the style attribute is empty.

I have checked the plugin JS of #2061377: [drupalImage] Optionally apply image style to images uploaded in CKEditor 5 and it's a bit different in the order of calling the original upcast function. In the attached patch I've also made these changes for this module. Please test this patch to see whether it resolves your issue.

keithm’s picture

Version: 8.x-2.0 » 8.x-2.x-dev
Status: Needs review » Reviewed & tested by the community
StatusFileSize
new1.68 KB

Confirming this bug on Drupal 8.3.1.

@jeroen_betawerk thanks for the steps to reproduce. Your patch didn't apply with 'git apply' so I rerolled it.

Confirming that your patch fixed the problem.

  • keithm committed 07dd3d9 on 8.x-2.x
    Issue #2800259 by jeroen_betawerk, keithm: Fixed responsive style lost...
keithm’s picture

Status: Reviewed & tested by the community » Fixed
fkelly12054@gmail.com’s picture

For what it's worth, I was an early user of this module but abandoned it when bugs started appearing in the second half of 2016. Given the absolute lack of progress with https://www.drupal.org/node/2061377 I revisited. I had already deactivated the previous version of inline responsive images (the one marked as stable) so I deleted it entirely and downloaded the 8.x-2.x-dev, installed and activated.

A quick test shows it working properly. Thanks @keithm and @betawerk.

Perhaps this could be fed back to the "mother" thread and form the basis for resolving this three year old issue for everyone.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.