Search Results (Searched for: phpthumb)

02 Jan 2025 15:55
Replied by lipatovroman on topic Convert to WEBP?

hello
its possible to use phpthumb librairie to allow webp conversion but some old browser arn't compatible
caniuse.com/webp but need to update image output like this
Code:
<picture> <source srcset="img/awesomeWebPImage.webp" type="image/webp"> <source srcset="img/creakyOldJPEG.jpg" type="image/jpeg"> <img src="img/creakyOldJPEG.jpg" alt="Alt Text!"> </picture>

we will study if we can add it in core

Ok, Georgios says that we can convert all images on server and then just replace file extensions in DB (find/replace).
But also we need to increase number before file name if the old extension had fewer characters.



So, first step in to convert images on server.
And second is to find and replace png to webp.
Code:
UPDATE _flexicontent_fields_item_relations SET value = REGEXP_REPLACE( REGEXP_REPLACE(value, 'a:([0-9]+):\\{', 'a:\\1+1:{', 1), 'png', 'webp' ) WHERE field_id = 15 AND value LIKE '%png%';

 
02 Jan 2025 09:58
Replied by micker on topic Convert to WEBP?
hello
its possible to use phpthumb librairie to allow webp conversion but some old browser arn't compatible
caniuse.com/webp but need to update image output like this
Code:
<picture> <source srcset="img/awesomeWebPImage.webp" type="image/webp"> <source srcset="img/creakyOldJPEG.jpg" type="image/jpeg"> <img src="img/creakyOldJPEG.jpg" alt="Alt Text!"> </picture>
we will study if we can add it in core
Displaying 1 - 2 out of 2 results.
Time to create page: 0.347 seconds
Cookies user preferences
We use cookies to ensure you to get the best experience on our website. If you decline the use of cookies, this website may not function as expected.
Accept all
Decline all
Essential
These cookies are needed to make the website work correctly. You can not disable them.
Display
Accept
Analytics
Tools used to analyze the data to measure the effectiveness of a website and to understand how it works.
Google Analytics
Accept
Decline
Save