plugin-icon

WebP Express

Автор: rosell.dk·
Предоставляет автоматически генерируемые изображения WebP для браузеров с поддержкой WebP вместо jpeg/png.
Рейтинг
4.4/5
Версия
0.25.10
Активные установки
400K
Последние изменения
Dec 16, 2025
WebP Express

Более 9 из 10 пользователей используют браузер, который способен отображать изображения webp. Тем не менее, на большинстве веб-сайтов им предоставляются изображения в формате jpeg, размер которых обычно вдвое превышает размер изображений webp при заданном качестве. Какая пустая трата пропускной способности! Этот плагин был создан, чтобы помочь исправить эту ситуацию. Без особых усилий администраторы WordPress могут заставить свой сайт предоставлять автоматически созданные изображения webp в браузерах, которые его поддерживают, при этом продолжая предоставлять файлы jpeg и png в браузерах, которые не поддерживают webp.

The image converter

The plugin uses the WebP Convert library to convert images to webp. WebP Convert is able to convert images using multiple methods. There are the «local» conversion methods: imagick, cwebp, vips, gd. If none of these works on your host, there are the cloud alternatives: ewww (paid) or connecting to a WordPress site where you got WebP Express installed and you enabled the «web service» functionality.

The «Serving webp to browsers that supports it» part.

The plugin supports different ways of delivering webps to browsers that supports it:

  1. By routing jpeg/png images to the corresponding webp — or to the image converter if the image hasn’t been converted yet.
  2. By altering the HTML, replacing image tags with picture tags. Missing webps are auto generated upon visit.
  3. By altering the HTML, replacing image URLs so all points to webp. The replacements only being made for browsers that supports webp. Again, missing webps are auto generated upon visit.
  4. In combination with Cache Enabler, the same as above can be achieved, but with page caching.
  5. You can also deliver webp to all browsers and add the webpjs javascript, which provides webp support for browsers that doesn’t support webp natively. However, beware that the javascript doesn’t support srcset attributes, which is why I haven’t added that method to the plugin (yet).

The plugin implements the «WebP On Demand» solution described here and builds on a bunch of open source libraries (all maintained by me): — WebP Convert: For converting images to webp — WebP Convert Cloud Service: For the Web Service functionality — DOM Util for WebP: For the Alter HTML functionality — Image MimeType Guesser: For detecting mime types of images. — HTAccess Capability Tester: For testing .htaccess capabilities in a given directory, using live tests — WebP Convert File Manager: For browsing conversions and triggering conversions. — Exec With Fallback: For emulating exec() on systems where it is disabled (using proc_open(), passthru() or similar alternatives).

Преимущества

  • Much faster load time for images in browsers that supports webp. The converted images are typically less than half the size (for jpeg), while maintaining the same quality. Bear in mind that for most web sites, images are responsible for the largest part of the waiting time.
  • Улучшение пользовательского опыта (независимо от того, меняется ли производительность с ужасной на плохую или с хорошей на впечатляющую, это является преимуществом).
  • Лучший рейтинг в поиске Google (производительность учитывается Google).
  • Less bandwidth consumption — makes a huge difference in the parts of the world where the internet is slow and costly (you know, ~80% of the world population lives under these circumstances).
  • Currently ~97% of all traffic are done with browsers supporting webp.
  • It’s great for the environment too! Reducing network traffic reduces electricity consumption which reduces CO2 emissions.

Ограничения

Поддержка WebP Express

Хлеб на столе не предоставляется бесплатно, хотя этот плагин предоставляется и всегда будет предоставляться. Мне нравится разрабатывать это и поддерживать вас, ребята, но хлеб мне тоже вроде как нужен. Пожалуйста, дайте мне возможность продолжать тратить время на этот плагин:

Supporters of WebP Express

Persons who recently contributed with ko-fi — Thanks!

  • 9 Aug: Tanzi
  • 3 Jul: Jen
  • 26 Jun: Per
  • 16 May: Erick Danzer
  • 8 May: Mike
  • 31 May: parallactic
  • 14 May: Gitte Rebsdorf
  • 9 May: La Braud

Persons who contributed with extra generously amounts of coffee / lifetime backing (>30$) — thanks!:

  • Max Kreminsky ($115)
  • Justin — BigScoots ($105)
  • Bill Vallance ($102)
  • Label Vier ($100)
  • Sebastian ($99)
  • Tammy Lee ($90)
  • Steven Sullivan ($51)
  • Mathieu Gollain-Dupont ($50)
  • Erica Dreisbach ($50)
  • Brian Laursen ($50)
  • Dimitris Vayenas ($50)
Проверено на
WordPress 6.9
Этот плагин можно скачать и использовать при .