Download the PHP package generoi/wp-image-resizer without Composer
On this page you can find all versions of the php package generoi/wp-image-resizer. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download generoi/wp-image-resizer
More information about generoi/wp-image-resizer
Files in generoi/wp-image-resizer
Package wp-image-resizer
Short Description A plugin which provides dynamic image sizes through a CDN
License MIT
Homepage https://github.com/generoi/wp-image-resizer
Informations about the package wp-image-resizer
wp-image-resizer
A plugin which provides dynamic image sizes through a CDN
Requirements
A resizer service, this plugin currently supports:
- A cloudflare CDN zone with image resizing enabled.
- KeyCDN with pull zone configured
- Fastly with image optimzer enabled
Note that you'll need to manage the loading
attribute yourself. Only tags with
loading="lazy"
will get rewritten to use lozad.js
. You should ensure that
the LCP blocks have loading="eager"
or no loading
attribute at all.
IMAGERESIZER_ZONE
environment variable is required.
Environment variables
Features
- Use lozad.js to lazyload images, iframes and videos
- Support for
sizes="auto"
throughdata-sizes="auto"
- Preload first blocks image
- Rewrite image URLs to use Cloudflare CDN
- Replace all WP
srcset
with our Cloudflare Image Resizing URLs
API
See Cloudflare docs, KeyCDN docs or Fastly docs for transformation options.
Pass custom options
You can pass custom options to the resizer when using wp_get_attachment_image
by setting data-resizer-args
which supportes wp_parse_args
type strings.
Generate src and srcset from URL
Generate src and srcset from attachment
Add a preload link tag to head
Filters
Development
Install dependencies
composer install
npm install
Run the tests
npm run test
Build assets
# Minified assets which are to be committed to git
npm run build:production
# Watch for changes and re-compile while developing the plugin
npm run start