Closed Scrabble96 closed 1 year ago
Fiexed in commit - https://github.com/widgetfactory/jce/commit/f8150e246de16ff797d016889cb30f3dd40f1df6 and https://github.com/widgetfactory/jce/commit/d0ec0f0fed9551cdf6db895a590d2c5120df28a7
The fixes will be included in the next update.
Thank you.
I am using Joomla 4.2.9 and JCE 2.9.34 Core
Describe the bug J4 introduced code so that when adding images in the 'Images and Links' tab and to custom fields of the type 'Media' to an article or custom module it also adds the 'height', 'width' and 'loading="lazy"' attributes.
It works correctly using TinyMCE.
It does not work correctly if: a. Using JCE Editor b. TinyMCE is the default editor and JCE Editor is installed but disabled
To Reproduce Steps to reproduce the behaviour: For images in "Images and Link" tab:
"images/banners/osmbanner1.png"
<img src="/images/banners/osmbanner1.png" itemprop="image">
Expected behavior It should be
images/banners/osmbanner1.png#joomlaImage://local-images/banners/osmbanner1.png?width=468&height=60
Which would then, using a few links of core JavaScript, translate to front-end html of:
<img src="/images/banners/osmbanner1.png" itemprop="image" alt="test image" loading="lazy" width="468" height="60">
For media field, it is much the same process:
Additional Information After inserting the image, click on the field with the image url, then inspect the code in developer tools and click on the 'Event' button. When inserting an image with JCE there are about 21 different events happening. When inserting an image with TinyMCE (and no JCE installed) there are only 3 events happening. See screenshots:
Screenshots With JCE:
With TinyMCE:![Intro-image-inserted-with-TinyMCE](https://user-images.githubusercontent.com/36987494/225874182-dfeb61c6-fbf6-4c86-86f6-b5e36412167e.jpg)
Desktop: