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.
I've installed and configured the Image resize filter (e.g. enabled it in the Enabled filters section admin/config/content/formats/manage/full_html).
Also I've created a content, uploaded a big image, resized it to small in the wysiwyg editor and saved it.
If I "view" the code through website code viewer I see that the IMG tag has set up width and height of the image, but "actual size" of the image comming from server is the full size of the image.
Drupal 8.2.2
Comment | File | Size | Author |
---|---|---|---|
#10 | interdiff-8-10.txt | 2.96 KB | rang501 |
#10 | 2825339-support-images-without-uuid-max-width-10.patch | 23.43 KB | rang501 |
#9 | settings.png | 31.21 KB | gnuget |
#8 | 2825339-support-images-without-uuid.patch | 21.8 KB | gnuget |
Comments
Comment #2
gnugetHi!
Did you try ordering the filters? the resize filter must be the last one to be executed.
Also, for now, it only supports images uploaded through the editor (inline images).
Comment #3
gnugetI'm going to postpone this until we have more info.
Comment #4
Nor4a CreditAttribution: Nor4a as a volunteer commentedI take a look at the code in the file FilterImageResize.php
And I see the data-entity-uuid is required for the code to work. But images inserted through the IMCE editor does not have the data-entity-uuid! Probably this is the issue...
Comment #5
gnugetYeah, I think that is the problem.
Comment #6
Nor4a CreditAttribution: Nor4a as a volunteer commentedYes - I checked - it works with the default image upload button as it provides the data-entity-uuid.
Comment #7
RobertoGuzman CreditAttribution: RobertoGuzman commentedi have the same issue, any update ?
Comment #8
gnugetOk, we finally have progress here!
The thing is, the first version of this port was taking advantage of the UUID attribute of the images, this allows to keep it SUPER small because all the code to get info from the images was removed and Drupal was providing it, but sadly I couldn't find a way to get that info from images without UUID and even this let us with a few missing features like the support for remote images.
So I now restored the code that handles that so we can support any image uploaded and this allows us to add support for the remote images in the D8 version.
So patch attached, let me know if it is working for you.
Regards!
Comment #9
gnugetA small note, just as the D7 version, you need to configure the plugin in the filter formats page:
Comment #10
rang501 CreditAttribution: rang501 at ADM Interactive commentedHi!
I tried to merge #2896172: No configuration options into this, hopefully this helps someone.
Comment #12
mlncn CreditAttribution: mlncn at Agaric for Drutopia, Teachers with GUTS commentedSweet! All of Gnuget's original patch, except for the addition of the composer.json and i think the config schema file have been committed to the 8.x-1.x branch there. This issue can probably be closed then? Those extra files are worth committing separately i think.
Comment #13
ram4nd CreditAttribution: ram4nd as a volunteer commented