這個外掛並未在最新的 3 個 WordPress 主要版本上進行測試。開發者可能不再對這個外掛進行維護或提供技術支援,並可能會與更新版本的 WordPress 產生使用上的相容性問題。

ResizeFly

描述

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

安裝

  1. Upload the plugin to your plugins directory (usually wp-content/plugins)
  2. Make sure you have Pretty Permalinks enabled
  3. 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.

常見問題

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.

評價

2020年4月22日 1 reply
Thank you so much for such a brilliant solution for WordPress Image Sizes! This should be added to the WP-Core in my opinion. No more painful time consuming regenerating image sizes. Yay! I love all the settings as well! It's so nice to be able to see all of the registered image sizes right there in on place plus the option to Restrict Image Sizes is just wonderful! Oh and on top of that we can even add new image sizes right there on the settings page! Just wow! Thank you so much. GBY.
2019年2月19日 1 reply
The idea to only generate thumbnails that are really needed, with the added flexibility of specifying sizes dynamically, is quite obvious and a real miss in wordpress. Sites can get very big when all sorts of plugins add their image sizes to the the website, creating a lot of unused images. This is plugin is very well written and works great! I would recommend it.
2018年2月11日
Nach umfangreichen Änderungen an meiner Website (mehrmals neues Theme) u.v.a. sind meine BackUp-Dateien grössenmässig aus allen Nähten geplatzt. Alle nicht mehr benötigten Bildgrössen per FTP von Hand zu löschen hat, wie zu erwarten war, schnell zu Fehlern geführt. Auf der Suche nach einer Lösung per Plugin bin ich zu meinem Glück auf ResizeFly von Alexander Goller gestossen. Am 23.01.2018 habe ich einen Fehler gemeldet, schon am nächsten Tag kam das Bugfix zurück. Am 9.2.2018 bemerkte ich einen anderen Fehler und heute morgen (11.2.2018) war er schon beseitigt. Das ist Support der Extraklasse. Mit der Version 2.0.3 bin ich rundum glücklich. Wenn ich jetzt ein BackUp der Medien machen will, lösche ich einfach den Medien-Cache (also alle skalierten Bildgrössen) und hab damit als Downloadvolumen nur die ursprünglich hochgeladenen Dateien und sonst keinerlei Überhang. Die notwendigen umgerechneten Bildgrößen bauen sich ja automatisch wieder auf, sobald sie im Browser angezeigt werden sollen. Vielen Dank Alex
閱讀全部5個評價

貢獻者及開發者

“ResizeFly” 是一個開源的軟體。以下的人對這個外掛作出了貢獻。

貢獻者

ResizeFly 外掛目前已有 1 個本地化語言版本。 感謝所有譯者為這個外掛做出的貢獻。

將 ResizeFly 外掛本地化為台灣繁體中文版。

對開發相關資訊感興趣?

任何人均可瀏覽程式碼、查看 SVN 存放庫,或透過 RSS 訂閱開發記錄

修改日誌

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