A.Burdonskaya
A.Burdonskaya

Reputation: 561

Convert webp to jpeg using JS

We have a React application with nginx.

I need to replace all images to the webp format. But safari does not support webp, so the question is: is it possible on the user side, without SSR, convert images from webp to jpg, using only JS?

Upvotes: 1

Views: 1808

Answers (1)

V.Volkov
V.Volkov

Reputation: 739

The best practice would be to use <picture> tag to advice both formats to a browser to pick by itself and load the supported one. No JS is needed in your case.

Upvotes: 0

Related Questions