V
V
Vladimir Banduristov2019-06-05 10:18:04
1C-Bitrix
Vladimir Banduristov, 2019-06-05 10:18:04

How to resave all images in WEBP format in Bitrix?

Actually a subject. It is necessary to re-save all pictures when adding them to WEBP so that they can be displayed at the front through picture. We searched all over the Internet but did not find a solution. I do not want to climb into the core. And here it is important not how to save in Webp - this is understandable, but how exactly in Bitrix to override the method of saving the image in order to save webp next to the original image.

Answer the question

In order to leave comments, you need to log in

4 answer(s)
R
Roman Gritsuk, 2019-06-05
@winer

I did not solve this problem myself. But offhand, you can try to do it in one of the following ways:
- You can do it as it is written here https://dev.1c-bitrix.ru/support/forum/forum32/top...
- On-the-fly image optimization

V
Viktor Taran, 2019-06-05
@shambler81

no way, the standard mechanism can’t

S
serginhold, 2019-06-05
@serginhold

You yourself found that the only event you can hook onto is onFileSave. Here also you write this event, in it you check that the file is a picture and you convert. And how to convert an image does not apply to Bitrix, Google to the rescue. It seems that even gd and imagick have such functions.

A
Andrey Brekotkin, 2019-07-18
@brekot

I found this solution for myself: https://www.brekot.ru/blog/bitrix-webp/

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question