Skip to content
Marc edited this page Apr 21, 2020 · 4 revisions

Welcome to the ImportExternalImages wiki!

A note about webp images:

As you know, webp is an output format, and webp format images should never be imported into the PW admin.

But in recent months, a lot more sites are outputting images in webp.

This module was recently updated to support skipping images with a .webp extension, as this would break the page due to the imagesizer crashing. The module simply respects the extensions specified in the image field, so if you allow webp in your image field, the module will let those through to the field (but then the imagesizer will crash anyway).

Another commonly observed practice is for sites to now output images with a jpg/jpeg suffix, but the image is actually a .webp. There is no way for the module to know prior to importing it, whether the extension matches the the real type.

The module already checks to see if the exif filetype matches the image file extension. If it doesn't match, or if the image had no extension, it will add/correct the extension. The latest release of the module will also check to see if the image type is a webm and if so, it will remove the image, during the import process and show an error alert.

Further Info

Webp images are only an "output" format for the web and many browsers do not support webp. So there always needs to be a backup format for the browser to have a choice for which image to present. Browsers that support webp will use that and others will use the jpg version.

In the ProcessWire admin, images can only be in jpg, png or gif format, so there will never be a time where webp will be supported in the admin. Processwire can convert on output to webp, but the imagesizer engine cannot resize webp.

In terms of how this applies to use of this module, you will undoubtedly come across webp formatted images more and more, and those will now be rejected by the this module as long as webp is not specified as an allowed extension in the field.

There is a plan to eventually add a feature to the this module that enables it to convert webp to jpg before importing. Until that is implemented, you have some options:

(1) Use Safari or some other browser that doesn't support webp instead to find the image (Safari doesn't currently support webp so you will get the jpg instead).

(2) download the webp and convert it using an online converter (or look up on google how to convert webp to jpg)

(3) Screenshot the image and use the jpg/png screenshot.

Clone this wiki locally