No bug images optimization problem

More
1 year 4 months ago - 1 year 4 months ago #2325 by Hervé
images optimization problem was created by Hervé
Hello Ruud

1/ Oops, I just did a test with pagespeed.web.dev/report?url=https%3A%2F%2Fcochanger.eu%2F&form_factor=desktop
on a new site that I have just communicated.
I notice that the images remain in their original format with the weight of more than one mo on the blog or the article (ex.: cochanger.eu/site-web/annuaire-carte-lieu/solicycle) :-(
I thought I had taken the right values from the extension configuration. I forced to yes: "Force (Re)Create Cache".
No result. It is possible to force the regeneration of optimized image?

2/ very different images
On these community sites, people can put images of very different sizes between 125 px cochanger.eu/site-web/outil/en-10-minute...-agir-des-maintenant or up to a maximum of 800px (above I truncate the stored image)
Would you have a trick so that the small images are not distorted on the blog part?

See also the images, if you have tips to optimize this site with your plugin
Last image, after setting "Force (Re)Create Cache"=not
Regards
Attachments:
Last edit: 1 year 4 months ago by Hervé.
The topic has been locked.
More
1 year 4 months ago #2326 by Ruud van Lent
Replied by Ruud van Lent on topic images optimization problem
Good morning Herve,
1. on the page provided, ochResponsiveImages is not handling te image, can you turn on debug in advanced settings and see if there is a reason in the log file for the plugin as to why not?

2. I do not see distorted images, I see same as 1. ochRI is not handling the image.

As for recreating the optimized images: when you set in advanced to force recreate, the it will create the images on every page visit: this should only be used temporarily e.g. when you changed the image while keeping the same file name.

When you want to recreate the optimized images, you can just delete all files in the ochri directory. The images will then be recreated on first visit.
 
The topic has been locked.
More
1 year 4 months ago - 1 year 4 months ago #2327 by Hervé
Replied by Hervé on topic images optimization problem
Hello Ruud
I have activated the debug mode and browsed the site, but I can't find where the log file is?

1/ The /ochri/ directory is full of images.
I renamed /ochri/ to /ochriEX/ and browse the site, there are no images created.
I create the empty /ochri/ directory and I browse the site, there is no creation of images.

I can give access to the site if necessary.
Regards
Last edit: 1 year 4 months ago by Hervé.
The topic has been locked.
More
1 year 4 months ago #2328 by Ruud van Lent
Replied by Ruud van Lent on topic images optimization problem
Hi,
the log file is in the sites log directory, normally that would be (if not configured differently) ./administrator/logs

When no images are created in the ochri directory is a sign that the plugin is not triggered (correctly) on the pages.
If you can mail me the credentials i can have a look.

regards,
Ruud.
The following user(s) said Thank You: Hervé
The topic has been locked.
More
1 year 4 months ago - 1 year 4 months ago #2329 by Hervé
Replied by Hervé on topic images optimization problem
Hello
1/ thank you for this resolution.
After deactivating the other plugin, it works :-)
I hope he will modify his plugin.
Do you have any other suggestions to optimize your plugin settings?

2/ The 150px image is enlarged on the blog page cochanger.eu/ (vs cochanger.eu/site-web/outil/en-10-minute...-agir-des-maintenant) , which makes the image look bad next to the other images which are reduced.
Code:
<img ... width="150" height="150" loading="lazy" data-path=.. >
Would it be possible for the plugin to only touch the image below a certain value on a blog page?

Regards

 
Last edit: 1 year 4 months ago by Hervé.
The topic has been locked.
More
1 year 4 months ago #2334 by Ruud van Lent
Replied by Ruud van Lent on topic images optimization problem

Hello
1/ thank you for this resolution.
After deactivating the other plugin, it works :-)
I hope he will modify his plugin.

github.com/nikosdion/joomlasvg/issues/4

Do you have any other suggestions to optimize your plugin settings?
 

Nope, no other suggestions

2/ The 150px image is enlarged on the blog page cochanger.eu/ (vs cochanger.eu/site-web/outil/en-10-minute...-agir-des-maintenant) , which makes the image look bad next to the other images which are reduced.

Code:
<img ... width="150" height="150" loading="lazy" data-path=.. >
Would it be possible for the plugin to only touch the image below a certain value on a blog page?
 

that image is NOT handled by the plugin as it is below the minimum size you configured. So this is a template issue and should be fixed there
The topic has been locked.
More
1 year 3 months ago #2338 by Hervé
Replied by Hervé on topic images optimization problem
Hi Ruud
1/ Thanks to your intervention. Thank you

2/ I'm trying to find a way to apply a style based on the size of the image on a CSS forum, but it seems to be difficult or impossible.
Would you have an idea? If it is not possible with css, is it detectable in php?
Regards
The topic has been locked.
More
1 year 3 months ago #2339 by Ruud van Lent
Replied by Ruud van Lent on topic images optimization problem
you can try
Code:
div.item-content > img {   object-fit: contain; }
 so 'contain' in stead of 'cover'

I would not try to solve this server side using PHP, the image width / heigth is passed in the <img> element and can be read / handled by JavaScript. But that would be a last resort only when you cannot find an acceptable CSS solution
The topic has been locked.