You need to be logged in to post in the forum - Log In

An active JCE Pro Subscription is required to post in the forum - Buy a Subscription

Support is currently Offline

Official support hours
Monday to Friday
09:00 - 17:00 Europe/London (BST)

Please create a new Ticket and we will get back to you as soon as we can.

#117109 Serve images in jpg and webp format

Posted in ‘Editor’
This is a public ticket

Everybody will be able to see its contents. Do not include usernames, passwords or any other sensitive information.

Latest post by Ryan on Monday, 03 March 2025 10:12 GMT

datamax.levanto

Hi Ryan,

I would like to serve to visitors for the same image the two images formats .jpg and .webp

1. Is it ok to use the "Image Manager Extended" and give on "Image URL" the .jpg and on "Responsive URL" the .webp version? Or responsive is only used for different formats of the same .jpg image?

2. Should I use instead the <picture> tag?

Actual code example:

<a href="https://www.joomlacontenteditor.net/images/stories/web/portofino/portofino-1200.webp" class="jcepopup" title="Portofino" data-mediabox="1" data-mediabox-group="portofino"><img src="https://www.joomlacontenteditor.net/images/stories/web/portofino/portofino-350.jpg" alt="Portofino Liguria" width="350" height="233" style="margin: 0px 20px 5px 5px; border: 1px solid #000000; float: left;" /></a>

New code:

<p><a href="https://www.joomlacontenteditor.net/images/stories/web/portofino/portofino-1200.webp" class="jcepopup" title="Portofino" data-mediabox="1" data-mediabox-group="portofino"><img src="https://www.joomlacontenteditor.net/images/stories/web/portofino/portofino-350.jpg" srcset="https://www.joomlacontenteditor.net/images/stories/web/portofino/portofino-350.webp 350w" alt="Portofino Liguria" width="350" height="233" style="margin: 0px 20px 5px 5px; border: 1px solid #000000; float: left;" /></a>

3. other question: I saw that JCE is using the "image url" format without "/" at the path beginning.

Example: the url "/images/..." will be changed to "images/...". Is it correct?

Best regards
Max

Ryan

1. Is it ok to use the "Image Manager Extended" and give on "Image URL" the .jpg and on "Responsive URL" the .webp version? Or responsive is only used for different formats of the same .jpg image?

Yes. If it works for you, it is perfectly OK.

2. Should I use instead the <picture> tag?

This will work too, but it can be a bit complicated.

3. other question: I saw that JCE is using the "image url" format without "/" at the path beginning.

The leading slash is added by the Joomla System - SEF plugin. JCE will always create relative URL values by default without the leading slash. This ensures that after processing by the System - SEF plugin they resolver correctly.

Ryan Demmer

Lead Developer / CEO / CTO

Just because you're not paranoid doesn't mean everybody isn't out to get you.