alpipego / resizefly
Dynamically resize WordPress images on the fly
Installs: 1 189
Dependents: 1
Suggesters: 0
Security: 0
Stars: 19
Watchers: 2
Forks: 3
Open Issues: 8
Type:wordpress-plugin
Requires
- php: >=5.6
- composer/installers: ~1.0
Requires (Dev)
- friendsofphp/php-cs-fixer: ^2.0
- phpmetrics/phpmetrics: ^2.4
- pimple/pimple: ^3.1.0
- psr/container: ^1.0
- roave/backward-compatibility-check: ^2.0
- sebastian/phpcpd: ^4.1
- wapmorgan/php-code-analyzer: ^1.0
- dev-master
- 4.0.0-beta7
- 4.0.0-beta6
- 4.0.0-beta5
- 4.0.0-beta4
- 4.0.0-beta3
- 4.0.0-beta2
- 4.0.0-beta1
- 3.3.0
- 3.2.6
- 3.2.6-beta.1
- 3.2.5
- 3.2.4
- 3.2.3
- 3.2.2
- 3.2.1
- 3.2.0
- 3.1.5
- 3.1.4
- 3.1.3
- 3.1.2
- 3.1.1
- 3.1.0
- 3.0.0
- 2.2.0
- 2.1.6
- 2.1.5
- 2.1.4
- 2.1.3
- 2.1.2
- 2.1.1
- 2.1.0
- 2.0.5
- 2.0.4
- 2.0.3
- 2.0.2
- 2.0.1
- 2.0.0
- 1.3.5
- 1.3.4
- 1.3.3
- 1.3.2
- 1.3.1
- dev-dependabot/npm_and_yarn/minimist-and-mkdirp-1.2.8
- dev-dependabot/npm_and_yarn/qs-6.11.0
- dev-dependabot/npm_and_yarn/grunt-1.5.3
- dev-dependabot/npm_and_yarn/lodash-4.17.21
- dev-dependabot/npm_and_yarn/getobject-and-grunt-1.0.2
- dev-dependabot/npm_and_yarn/minimatch-3.0.8
- dev-dependabot/npm_and_yarn/hosted-git-info-2.8.9
- dev-develop
- dev-3.0-beta
This package is auto-updated.
Last update: 2024-11-28 00:43:22 UTC
README
Contributors: alpipego
Tags: dynamic images, dynamic, image, png, jpg, gif, photo, media library, on-the-fly, resize
Stable tag: 3.2.6
License: MIT
Requires at least: 4.7.0
Requires PHP: 5.6
Tested up to: 5.6
Dynamically resize your WordPress images on the fly. Upload them once and don't worry about missing or new image sizes.
Description
Instead of creating image sizes on upload, this plugin only creates them when requested.
Normally after activating a new theme or plugin that adds new image sizes, you will have to use a tool like Regenerate Thumbnails to create the newly registered image sizes. Depending on the size of the media library and the "power" of your server, this might take a while or even take several tries to process all your images; and in the end, you don't even know if you'll need all of the resized images.
This plugin takes care of the resizing dynamically and creates the requested size the moment it is first requested—and only when it is requested.
Support
For users: Please use the support forums on wordpress.org
For developers: Head over to the Github repository
For everything else, find me on twitter or on slack
Installation
- Upload the plugin to your plugins directory (usually
wp-content/plugins
) - Make sure you have Pretty Permalinks enabled
- Activate the plugin
The plugin handles the images from here on. The resized images are saved in a subfolder inside your uploads directory.
Prerequisites
You'll need at least PHP 5.5, WordPress 4.7 and either GD or Imagick on your server.
Uninstalling
If you want to uninstall the plugin for good, make sure to regenerate your image thumbnails/sizes afterward using Regenerate Thumbnails or similar.
Frequently Asked Questions
Why does this not work when using NGINX?
Often your NGINX is configured in a way to serve the image as a static resource and in case of failure throw a 404 Not Found error.
To work around this, make sure the request is sent to WordPress when the image cannot be found.
Add a directive like:
location ~* (/[^/]+/)?uploads/(.+\.(png|gif|jpe?g)) {
try_files $uri $uri/ /index.php?q=$uri&$args;
expires max;
log_not_found off;
access_log off;
}
If you have one long location directive listing all the static file formats (css, js, zip, etc.), you can also just drop the try_files $uri $uri/ /index.php?q=$uri&$args;
in there.
Why is there a resizefly-duplicate
directory in my uploads folder?
The plugin stores an optimized duplicate of each image in this folder. The reason for this is, that image resizing puts a strain on your server and uses comparably a lot of resources. To minimize this ResizeFly creates an optimized copy from which the smaller image sizes will be created.
Changelog
3.2.6
- fix issue with trying to add number to string
- revert methods to get image id to prevent db strain
see https://github.com/alpipego/resizefly/releases for full changelog