Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Displaying Error / 4.2.7 should fix this problem. #556

Open
torstenhoppe opened this issue Nov 9, 2023 · 5 comments
Open

Displaying Error / 4.2.7 should fix this problem. #556

torstenhoppe opened this issue Nov 9, 2023 · 5 comments

Comments

@torstenhoppe
Copy link

Sorry for my delay, but it won't work for me. When Content - Responsive Images is activated I can't enter my dashboard in the backend - the Error-Message is: 0 Class "Imagick" not found. And the same issue is frontend, the complete website is not shown.

Bildschirmfoto 2023-11-09 um 13 03 59
Bildschirmfoto 2023-11-09 um 13 05 35

4.2.7 should fix this problem.
If not please reopen this issue

Thanks

Originally posted by @dgrammatiko in #541 (comment)

@torstenhoppe
Copy link
Author

Maybe it is a problem with my server configuration. I will check this out next couple days and will report again.

@torstenhoppe
Copy link
Author

Hi there, just a little late, but it was'n possible earlier. So for me it's not working in version 4.2.7. In the meanwhile I updated my system to Joomla 5.0.1 my webserver is NGINX 1.25.3 with PHP 8.2.12 and MySQL 8.2.0.

For a better understanding I'd like to reply my problem again: In Joomla Backend I created a custom admin modul with a simple HTML table with 2 colums. The first is just coms text and 2nd is a picture. Inside the editor I can define some parameters for this picture, espacialy the width and height.
When I deactivate the plugin the HTML-Code is:

<img style="display: block; margin-left: auto; margin-right: auto;" src="../images/path/picture.png" width="300" height="149" loading="lazy" data-path="local-images:/path/picture.png">

231129-01

But when I activate the plugin it seems not interpreting this paramaters as expected. The HTML-Code is:

<picture class="responsive-image">
<source type="image/webp" srcset="/media/cached-resp-images/path/picture_1920.webp?version=xyz 1920w, /media/cached-resp-images/images/path/picture_1600.webp?version=xyz 1600w, /media/cached-resp-images/images/path/picture_1200.webp?version=xyz >

<source type="image/png" >
<img decoding="async" style="display: block; margin-left: auto; margin-right: auto;"
src="/images/path/picture.png" width="3448" height="1714"
loading="lazy" data-path="local-images:/path/picture.png">
</picture>

And here it takes the original width and height of the image and doesn't interpret the parameter that I captured in the form (see screenshot)

@dgrammatiko
Copy link
Member

dgrammatiko commented Nov 29, 2023

espacialy the width and height

The width and height are automatically extracted from the original image. The reason is that these values are there so the browser could calculate the pre-rendered area and not to set the size of the image. The whole idea with responsive images is that you set a container size and then the image will render inside it with a width 100% and height auto. So, in your case wrap the image in a div with a class (or inline style) to set the preferred size

About the size part: the calculated aspect ratio in the 1st case is width/height = 300/149 = 2.013
in the case of responsive images is width/height = 3448/1714 = 2.011
So, essentially the aspect ratio is the same

@torstenhoppe
Copy link
Author

Yes I understand, but if I have adjusted the values within the editor, then I expect them to be applied and not recalculate the original values from the size of the file, right?
The problem is still that I get a much too large display of the image - which I did not expect.

@dgrammatiko
Copy link
Member

then I expect them to be applied and not recalculate the original values from the size of the file, right?

Nope, the size are always reflect the given image size, that's by design

then I expect them to be applied and not recalculate the original values from the size of the file, right?

Could you send me the generated html for the module at d.grammatiko at gmail dot com?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants