GithubHelp home page GithubHelp logo

ddur / warp-imagick Goto Github PK

View Code? Open in Web Editor NEW
32.0 5.0 1.0 613 KB

Warp iMagick - Image Compressor - WordPress Plugin: Optimize Images on-site. No cloud-optimization-service. Convert to WebP - On-Upload, On-Regenerate, On Demand (v2.+). Set JPEG Quality and Sharpness. Set Big Image Threshold and Resize on Upload.

Home Page: https://warp-imagick.pagespeed.club/

License: GNU General Public License v2.0

PHP 87.79% JavaScript 9.30% CSS 2.90%
wordpress-plugin image-optimization image-optimisation image-optimizer image-compressor image-compression convert-webp webp php wordpress

warp-imagick's Introduction

WP Version compatible PHP Version compatible WordOps compatible

Warp iMagick - WordPress Image Compressor Plugin. Resize, Optimize, Sharpen, Compress, Regenerate, Clone & Convert to WebP - Next Gen Image Format.

  • Unlike almost all of other WordPress Image Optimizer Plugins, this plugin is NOT just connector to external Image Optimization Service. Image Optimization is performed by your WordPress site server, free and at the "expense" of your hosting provider CPU time. No external image optimization service/signup required. No limits in number or megabytes of optimized images. No risky/external binaries required to install on your site server. Plugin uses only safe PHP extension software available or installed on your server by your hosting provider: PHP-imagick and PHP-GD. If you find any comparable and free plugin that is compressing images without using external service, please let me know ๐Ÿ˜Ž.

  • Unlike some other WordPress Image Optimization Plugins, this plugin allows you to regenerate images to high-compression/low-quality and back to high-quality/low-compression images. You can't overcompress or unrecoverably degrade images quality by regenerating thumbnails again and again. Uploaded original image quality is always preserved. In some other plugins, once original image is (re) compressed to lower compression quality then on next regeneration, original and regenerated thumbnails are permanently degraded in quality. In this plugin, instead of compressing original, attached image is replaced with optimized version of original, but that can be disabled if you want to show high quality original photo to site visitors.

  • Unlike any other plugin I have seen, this plugin has real visual size preview of media image and all generated thumbnails, including WebP clones. When mouse hovers over any image in a preview, a tooltip is shown with size-name (webp clone), pixel-size, file-name and byte-size.

  • Because of using server redirection rules, it does't matter if the image is served via HTML <img> or <picture> tag, CSS background-image: style or via JavaScript. It always works!

  • Due to flexible configuration and compression quality, Warp iMagick Plugin is endorsed and recommended by photografic site owner KennyLL support post.

  • Resizing images on upload (optional) allows you to reduce uploaded images to maximal number of pixels used on site. Feature is usefull on WordPress multisite/multiowner installs or on mobile-only sites.

  • Converting and cloning images to file-size efficient WebP format, allows you cover site compatibility with older and newer browsers and better pagespeed score by Google Pagespeed Insights and GTmetrix by serving Next-Gen image format.

  • Sharpening images allows you to fix blurry WordPress thumbnails.

  • WooCommerce and any theme compatible.

  • Project is active since 2019 and reached almost 20.000 active installs, in February-April 2022 moved out of WordPress cvs repository. Why? Because of dispute about plugin TITLE LENGTH in README.txt (See the comment).

  • Plugin is extended with YahnisElsts/plugin-update-checker in order to replace WordPress.org hosting & update service.

  • Tested with WordPress version 5.3 - 6.2. Compatible with PHP version 7.3 up to and including 8.2.

  • Tested with Apache Server and NGinx Server on WordOps configuration.

  • My favorite comment (later removed by someone):

WordPress.org Forums [email protected] Jan 19, 2021, 8:26โ€ฏPM undisclosed wrote:

Thank you so much for an amazing plugin, Helped my website from 7 seconds to 2.5 seconds!!! keep up the great work!

  • If you like and/or or use this plugin, please share it with your colegues, friends and please award this project with a GitHub Star (see top right on this page).

Share

  • Facebook share

  • Twitter share

Listed on

Install last WordPress release - Version 1.9.6:

  • Plugin Reviews
  • 10.000+ active installs
  • WP compatibility
  • PHP compatibility
  • Download Warp-iMagick Version 1.9.6 from WordPress Server
  • Use Your Wordpress Site Admin Menu -> Plugins -> Add New -> Press [Upload Plugin] Button and select just downloaded warp-imagick.1.9.6.zip file. Follow WordPress instructions ....
  • Attention: Any Plugin version (including 1.9.6) released via Wordpress server can't and will NOT be updated from WordPress-Server and can't automatically check for updates on own Update-Server. To be able to check for future version updates, download and install (or update to) latest version from Warp iMagick Update-Server as described in section below (or from this Github repository).

Attention: Plugin version 1.9.5.1 may be a spyware.

Install or Update from Update Server:

  • Go to Plugin Update Server
  • Press [Download Plugin] button and download & save free Warp iMagick plugin.
  • Use Your Wordpress Site Admin Menu -> Plugins -> Add New -> Press [Upload Plugin] Button and select just downloaded warp-imagick.zip file. Follow WordPress instructions ....

Register for Automated Updates:

  • Open Your Wordpress Site Warp-iMagick Plugin Settings Page at "General Settings" Tab -> "Plugin Settings" Section. Select and copy text from "Plugin Update Hostname" field.
  • In another browser Tab/Window, open Plugin Update Server, press [Automatic Updates] button, (register &) login. In your user profile go to section "Application Passwords". Paste copied "Plugin Update Hostname" into "New Application Password Name" field. Press "Add New Application Password" button and you will be presented with your new password. Copy text from "new password".
  • Go back to your Wordpress Site at Warp-iMagick Plugin Settings Page -> General Settings Tab -> Plugin Settings Section and paste your new password into "Plugin Update Password" Field.
  • Press [Save Changes] Button.
  • Note: Your email will NEVER be sold to anyone or used for spam purposes.
  • Note: You can delete your Update Server user profile and email at any time.
  • Note: You can add/register and get update passwords for more than one Warp iMagick Plugin (for each site/host/domain where is installed). Each Warp iMagick Plugin has different "Plugin Update Password" for every WordPress site (hostname).
  • Note: Without registration and password, plugin should let you know that new update is available but may fail to download & update plugin via WordPress administration panel/interface, either on-click-update or auto-update. In that case you may still have option to download/update plugin from Update Server as described in section above.

Post Install: Apache Server WebP Configuration:

To serve (from JPEG/PNG converted) WebP clones to WebP enabled browsers, you must configure your Apache server!

Configuring server to serve WebP images is fastest (page-speed) way to deliver WebP images. Server configuration is not changed by this plugin because programmatic change could potentially break your site. You will have to DIY (Do It Yourself) or break your site by yourself. ๐Ÿ˜Ž

To safely modify your Apache /.htaccess file, use Htaccess File Editor plugin. If you use other ways to modify/edit Apache /.htaccess file, always backup/save your original /.htaccess file before applying changes!

Below is Apache /.htaccess configuration snippet that should work on most Apache servers. Snippet is tested on Apache 2.4 installed on Linux Debian.

Use Copy button at top-right (visible on mouse hover) of code-snippet below and paste snippet at the top of /.htaccess file. Do not remove WordPress configuration or any other content of /.htaccess file.

# BEGIN Warp-iMagick - First line of .htaccess file.
# Serve WebP images instead of JPEG/PNG to WebP enabled browsers.

<IfModule mod_mime.c>
	AddType image/webp .webp
</IfModule>
<ifModule mod_rewrite.c>
	RewriteEngine On
	RewriteBase /

	RewriteCond %{HTTP_ACCEPT} image/webp
	RewriteCond %{REQUEST_URI} /wp-content/
	RewriteCond %{REQUEST_URI} (.*)\.(?i)(jpe?g|png)$
	RewriteCond %{REQUEST_FILENAME} -f
	RewriteCond %{REQUEST_FILENAME}.webp -f
	RewriteRule .* %1.%2.webp [T=image/webp,E=webp:1,L]

	<IfModule mod_headers.c>
		Header append Vary Accept env=REDIRECT_webp
	</IfModule>
</IfModule>

# END Warp-iMagick


After Apache /.htaccess file is successfully modified and your site is serving WebP images, you don't need Htaccess File Editor plugin anymore and feel free to uninstall it.

Looking for more details? Then press [Help] button at the top-right of Warp iMagick Settings page.

Post Install: WordOps Nginx Server WebP Configuration:

No Nginx configuration changes are required to automatically serve Webp images to WebP enabled browsers. WebP redirection just works with default WordOps Nginx Server configuration.

Post Install: Open Litespeed WebP Configuration:

Using Open Litespeed was never tested nor recommended for this plugin. I especially discourage you from buying services from a2hosting which has redistributed WP versions (below 1.9.6) of Warp iMagick plugin privatelly, only to it's paying clients. They used Warp iMagick name for advertizing purposes without linking to plugin web page. Although they probably having thousands of Warp iMagick plugin installs, they refused to cooperate with plugin author. I do not know what version or modifications you got from them. Plugin support will be provided only to latest original unmodified version released by author. So, if you are client of a2hosting with older or modified Warp iMagick plugin, do not expect help here.

๐Ÿ––

warp-imagick's People

Contributors

ddur avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Forkers

creativehassan

warp-imagick's Issues

Automatic Updates

whenever i try and register for automatic updates, over at https://warp-imagick.pagespeed.club/, i'm unable to reset my password. it says that it's sending a reset email, but none have ever arrived.

just an FYI, as your wordpress SMTP plugin probably isn't Authenticated.

Lib::debug: flooding debug.log & settings page

Is there a way to disable the Lib::debug: messages generated by the plugin? Considering that other plugins are being referenced by this plugin, it's REALLY generating a lot of unnecessary lines in the log.

The alerts are (and have been) flooding my debug.log, as well as the top of the plugin's Settings page.

'Lib::debug: Metadata update WITHIN "wp_create_image_subsizes" scope - $attachment_id: 10648
Lib::debug: Attachment (10648) metadata change detected
Lib::debug: Save metadata backup - $attachment_id: 10648
Lib::debug: Regenerate wp_create_image_subsizes( $file, _ ) does match [file] or [original_image]
Lib::debug: Post mime-type is not equal to JPEG or PNG image type:image/webp.
Lib::debug: Metadata update WITHIN "wp_create_image_subsizes" scope - $attachment_id: 10648
Lib::debug: Skip metadata backup [no-overwrite] - $attachment_id: 10648
Lib::debug: Metadata update WITHIN "wp_create_image_subsizes" scope - $attachment_id: 10648
Lib::debug: Skip metadata backup [no-overwrite] - $attachment_id: 10648
Lib::debug: Fixing $metadata sizes in context of: create
Lib::debug: Metadata update OUT-OF "wp_create_image_subsizes" scope - $attachment_id: 10648
Lib::debug: (Client) $remote_host: domain.local
Lib::debug: (Client) $uplink_host: warp-imagick.pagespeed.club
Lib::debug: (Client) $_local_host: domain.local
Lib::debug: (Client) Remote host ignored.'

image

(v 1.10.1) Lib::error: Regenerate wp_create_image_subsizes( _, $attachment_id ) argument mismatch!

I'm actually running into this error now, myself.

$ wp media regenerate --yes
Found 103 images to regenerate.
Lib::error: Regenerate wp_create_image_subsizes( _, $attachment_id ) argument mismatch!
Lib::error: Wrong editor class selected: WP_Image_Editor_Imagick
Lib::error: Function get_warp_editor() returned an error: Wrong editor class selected: WP_Image_Editor_Imagick1/103 Regenerated thumbnails for "cropped-AD_Logo_4color.png" (ID 2528).
Lib::error: Regenerate wp_create_image_subsizes( _, $attachment_id ) argument mismatch!
Lib::error: Wrong editor class selected: WP_Image_Editor_Imagick
Lib::error: Function get_warp_editor() returned an error: Wrong editor class selected: WP_Image_Editor_Imagick2/103 Regenerated thumbnails for "image" (ID 2527).
Lib::error: Regenerate wp_create_image_subsizes( _, $attachment_id ) argument mismatch!
Lib::error: Wrong editor class selected: WP_Image_Editor_Imagick
Lib::error: Function get_warp_editor() returned an error: Wrong editor class selected: WP_Image_Editor_Imagick```

I looked into updating:
``` nano +486 warp-imagick/classes/class-shared.php```

but found that line 486 already had:
```				return new \WP_Error( 'warp-imagick', $msg );```

also, this error came up a few times:
```Lib::error: Regenerate wp_create_image_subsizes( _, $attachment_id ) argument mismatch!
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile```

i looked into the file, thinking that it might be one of our PDFs that we have within this media library... but it ended up being a pretty normal jpg image.

i tried installing a few additional png mods on the server, but that didn't seem to have any effect.

any suggestions?

...i almost forgot to mention, this is a WordOps webstack.  other than a few plugins, i'd like to believe that this install is quite identical to our other installs.

Full size name change

Hi,

I use Warp-iMagick and Regenerate Thumbnails Bulk, but seems the full name of the images generated are saved like as from image1.jpg to xxx-1280x720.jpg, so if I run again bulk I get the following error for all images that are done before in bulk:

" The full-size image file cannot be found in your uploads directory at 2014/08/xxx-1280x720.jpg. Without it, new thumbnail images can't be generated."

The full image is still intact in wp-uploads but seems to be misleading data in the database.

I disable this plugin and run some bulk tests, and seems the bug come from this plugin, as without it installed all working correct, and no change to the full image path.

(v 1.10.1) Regenerate by WP CLI ERROR

Hi there,

Tried to regenerate media by WP CLI but not working. Here's the error message

Lib::error: Regenerate wp_create_image_subsizes( _, $attachment_id ) argument mismatch!โ€‰
Lib::error: Wrong editor class selected: WP_Image_Editor_GDโ€‰
PHP Fatal error:  Uncaught Error: Class 'ddur\Warp_iMagick\WP_Error' not found in /home/runcloud/webapps/test/wp-content/plugins/warp-imagick/classes/class-shared.php:486โ€‰
Stack trace:โ€‰
#0 /home/runcloud/webapps/test/wp-content/plugins/warp-imagick/classes/class-plugin.php(1227): ddur\Warp_iMagick\Shared::get_warp_editor()โ€‰
#1 /home/runcloud/webapps/test/wp-includes/class-wp-hook.php(308): ddur\Warp_iMagick\Plugin->on_intermediate_image_sizes_advanced_99_filter()โ€‰
#2 /home/runcloud/webapps/test/wp-includes/plugin.php(205): WP_Hook->apply_filters()โ€‰
#3 /home/runcloud/webapps/test/wp-admin/includes/image.php(375): apply_filters()โ€‰
#4 /home/runcloud/webapps/test/wp-admin/includes/image.php(496): wp_create_image_subsizes()โ€‰
#5 phar:///RunCloud/Packages/RunCloudAgent/bin/wp-cli/vendor/wp-cli/media-command/src/Media_Command.php(592): wp_generate_attachment_metadata()โ€‰
#6 phar:///RunCloud/Packages/RunCloudAgent/bin/wp-cli/vendor/wp-cli/media-command/src/Media_Command.php(162): Media_Command->pr in /home/runcloud/webapps/test/wp-content/plugins/warp-imagick/classes/class-shared.php on line 486โ€‰
Fatal error: Uncaught Error: Class 'ddur\Warp_iMagick\WP_Error' not found in /home/runcloud/webapps/test/wp-content/plugins/warp-imagick/classes/class-shared.php:486โ€‰
Stack trace:โ€‰
#0 /home/runcloud/webapps/test/wp-content/plugins/warp-imagick/classes/class-plugin.php(1227): ddur\Warp_iMagick\Shared::get_warp_editor()โ€‰
#1 /home/runcloud/webapps/test/wp-includes/class-wp-hook.php(308): ddur\Warp_iMagick\Plugin->on_intermediate_image_sizes_advanced_99_filter()โ€‰
#2 /home/runcloud/webapps/test/wp-includes/plugin.php(205): WP_Hook->apply_filters()โ€‰
#3 /home/runcloud/webapps/test/wp-admin/includes/image.php(375): apply_filters()โ€‰
#4 /home/runcloud/webapps/test/wp-admin/includes/image.php(496): wp_create_image_subsizes()โ€‰
#5 phar:///RunCloud/Packages/RunCloudAgent/bin/wp-cli/vendor/wp-cli/media-command/src/Media_Command.php(592): wp_generate_attachment_metadata()โ€‰
#6 phar:///RunCloud/Packages/RunCloudAgent/bin/wp-cli/vendor/wp-cli/media-command/src/Media_Command.php(162): Media_Command->pr in /home/runcloud/webapps/test/wp-content/plugins/warp-imagick/classes/class-shared.php on line 486โ€‰
Error: There has been a critical error on this website.Learn more about troubleshooting WordPress. There has been a critical error on this website.

It's working fine with regenerate thumbnails plugin.

Thanks!

How to make Nginx serve WebP on a non-WordOps config

Hi, and many thanks for this plugin. I am currently using it to optimize JPEGs on my website and wish to further use the WebP functionality. Before this plugin, I was using ShortPixel for image optimization and WebP delivery. To serve WebP, I was using the code shared by them.

I checked the README and cannot find any example configurations for post-install on Nginx setups that do not utilize WordOps. It'd be great if you could include an example config for users like me.

add AVIF format support

Hi! Thanks for your awesome plugin!

Do you have plan to add AVIF format support at the future version?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.