Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more

Install the server tools first, then connect them to the PHP image editor or WordPress optimization plugin. On a supported Ubuntu release, refresh APT and install ImageMagick plus the format-specific binaries: jpegoptim, optipng, pngquant, gifsicle, webp, and libavif-bin. Install SVGO through npm when SVG optimization is required. Finally, enable the Imagick PHP extension in the same PHP runtime used by your web server, restart that runtime, and verify every executable before testing uploads.

What this installation provides

WordPress can resize and convert media only when the server has a usable image-processing backend. The packages in this guide provide command-line encoders and ImageMagick support for common WordPress formats. They do not, by themselves, change WordPress behavior: your PHP image editor and optimization plugin must be configured to call the installed tools.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

The baseline installation covers JPEG, PNG, GIF, WebP, AVIF, and ImageMagick-based conversions. SVG optimization is a separate Node.js toolchain. Ghostscript is conditional: install it only when ImageMagick and Imagick must create thumbnails from uploaded PDF files.

Before you install

Confirm the Ubuntu and WordPress context

  • Use an account that can run sudo.
  • Back up the server or take a snapshot before changing production packages.
  • Confirm whether the site uses Apache with mod_php, Apache with PHP-FPM, or Nginx with PHP-FPM. The PHP extension must be enabled in that exact runtime.
  • Check the Ubuntu release with lsb_release -a or cat /etc/os-release. Package names and executable names can vary between releases.
  • Perform the installation on staging first if uploads are business-critical. A representative JPEG, PNG, WebP, and, when enabled, AVIF file should be available for testing.

Understand the two layers

There are two separate layers to configure:

  1. Operating-system tools: binaries such as jpegoptim, cwebp, and avifenc perform optimization or conversion.
  2. WordPress/PHP integration: WordPress’s image editor and the selected optimization plugin decide which backend to call, where output is written, and whether metadata is retained.

Installing a binary without configuring the second layer leaves WordPress unchanged. Conversely, enabling Imagick without installing the encoders needed by a plugin can produce missing-format or command-not-found errors.

#1 Best Overall
Sale
Compressed Air Duster,130000RPM Super Power Cordless Air Duster,Rechargeable Brushless Blower,3 Gear Adjustable Blower with LED Light,Dust Remover for Computer/House/Outdoor/Car
  • Powerful Turbo Fan:CAGIWIRU Electric Air Duster have reached speed up to 130000RPM,Can efficient remove dust and debris.With LED light and Three Adjustable Speed to meet with different cleaning tasks.
  • With Attached USB C Fasting Charging cable.Charing 3 hours,Enjoy up to 240 minutes of use on the lowest setting, For third speed can use for 25mins.with four charging options to meet with your needs.
  • Wide Application:Upgraded attached 5 different nozzles,making it suitable for a variety of scenes, such as car,pet, pc, keyboards, and other electronic devices. It also serves for office and home clean duster.
  • Handy Design & Portable:Cordless air duster electric nozzle is Light weight and small size, design and comfortable to hold and space saving, convenient to carry around. You can put it in your room or inside the car without taking up space.
  • Warranty & Support: Our Electric air duster comes with 5 years warranty and 24/7 customer service. During this period, if you have any questions,pls kindly feel free to contact us.

Install the core Ubuntu packages

1. Refresh APT package metadata

Ubuntu’s package-management guidance recommends APT for installing Debian packages. Always refresh the local index before installing:

sudo apt update

Read any error before continuing. A failed update can leave an old package index in place, causing “unable to locate package” messages or installing an older candidate than expected.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

2. Install ImageMagick and format-specific encoders

Install the practical baseline in one transaction:

sudo apt install imagemagick jpegoptim optipng pngquant gifsicle webp libavif-bin

APT resolves dependencies and reports the package versions selected for your Ubuntu release. Review the proposed changes and accept only if the package list is appropriate for the server.

Package Main executable Use in a WordPress workflow
imagemagick magick on newer layouts; convert on older ImageMagick 6 layouts General image reading, resizing, conversion, and the ImageMagick backend used through Imagick.
jpegoptim jpegoptim Optimizes JPEG photographs, usually by reducing redundant data and optionally removing metadata.
optipng optipng Lossless PNG recompression for graphics where pixel data must remain unchanged.
pngquant pngquant Palette-based PNG compression; useful when a smaller file is worth controlled color reduction.
gifsicle gifsicle Optimizes GIF files, including animated GIF workflows supported by the calling plugin.
webp cwebp Encodes JPEG or PNG source images as WebP.
libavif-bin avifenc Encodes images as AVIF when the site’s delivery and browser policy support it.

The package list follows the documented optimizer toolchain: JpegOptim for JPEG, Optipng and pngquant for PNG, Gifsicle for GIF, cwebp from webp for WebP, and avifenc from libavif-bin for AVIF.

Install SVG optimization support

Use SVGO through npm

SVG optimization is not supplied by the APT command above. In the documented Ubuntu/Debian setup, install SVGO globally with npm:

sudo npm install -g svgo

If npm is not installed, install the Node.js/npm toolchain approved for your server image before running that command. Keep the global npm directory available to the user and service account that will invoke the optimizer, or configure the plugin with the absolute path returned by command -v svgo.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

SVG is markup rather than a bitmap. Do not send untrusted SVG files through an automated pipeline without considering embedded scripts, external references, and sanitization. Optimization should not be treated as security filtering.

Rank #2
EVEO® Screen Cleaner Spray Kit (Streak-Free) TV Screen Cleaner for Smart TV, Lcd, LEd, Oled | Computer Screen Cleaner Spray and Wipe Microfiber Cloth - TV, Monitor, Laptop, iPad, Car - 6.7oz 1 Pack
  • Screen Cleaner is Your Screen’s New Bestfriend! - EVEO is proud to present a screen cleaner that’s perfectly suited for your TV. Meet your new screen cleaner, computer screen cleaner, laptop cleaner, iPad cleaner, Macbook,tv cleaner or any other electronic device. Our screen cleaner spray and wipe along with the included plush microfiber cloth, easily removes dust, fingerprints & other smudges on the screen’s surface. Clean effectively for a streak-free screen
  • Gentle on your Screens - Our screen cleaner spray and wipes is compatible to be used even for the most sensitive LCD, LED, CRT, and OLED screens in proper use. Be at ease knowing that this product is compatible with all the major brands: LG, SONY, Samsung, Sharp, iPad, iPhone, Android screens, Kindle, PC monitors - we’ve got you covered! Can be used as LCD screen cleaner, tv cleaner, smart tv screen cleaner, and more
  • Premium Super Soft Plush Microfiber Cloth - Included in this efficient screen cleaning kit. This screen cleaner spray and wipe has our signature plush microfiber cloth specially designed to comply with screens and monitors and leave them streak-free. Has been shown to effectively absorbs stubborn stains, zero streaks, and no fiber shedding. Always use this together with our screen cleaner for the best results
  • Easy-to-Use Screen Cleaner Kit + microfiber cleaning cloth - The EVEO Screen Cleaning Kit will easily be your new favorite tool when it comes to taking care of the things you love most, quick and easy solution for a streak-free screen. Simply screw on the sprayer gun on the screen cleaner bottle. Spray the cleaning liquid onto the microfiber cloth, then wipe the screen until desired cleanliness & shine is achieved.
  • Quality Screen Care Kit Worth Purchasing - Enjoy a convenient Screen Cleaner anytime, anywhere you need it. Your satisfaction is our top priority. We stand behind the quality of our products and that’s why, you shouldn’t be worrying at all. We manufacture the Best Screen Cleaner. and can be used for laptop cleaning kit, laptop screen cleaner, tv screen cleaner for smart tv. MacBook screen cleaner, monitor cleaner or screen cleaner spray for electronic devices with microfiber cleaning cloth

Enable ImageMagick through PHP Imagick

Check whether Imagick is already loaded

WordPress can use ImageMagick through the Imagick PHP extension. Check the command-line PHP environment first:

php -m | grep -i imagick
php --ri imagick

A module listed by CLI PHP is not proof that the web server uses the same PHP binary or configuration. A site running PHP-FPM can have a different version, configuration directory, and enabled-module set from the shell.

Install the extension for the active PHP version

On Ubuntu, the extension package is commonly named php-imagick. Install the distribution package that matches the PHP runtime serving the site:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
sudo apt install php-imagick

When several PHP versions are installed, use the version-specific package exposed by your Ubuntu repositories and verify that it is enabled for the web runtime. Do not assume the CLI version is the one used by PHP-FPM or Apache.

Restart the correct service

After installing or enabling an extension, restart the process that loads PHP. First identify the active service:

systemctl list-units --type=service | grep -E 'php.*fpm|apache2|nginx'

Then restart the service that actually handles PHP requests. For a PHP-FPM deployment, restart the installed PHP-FPM unit; for Apache with mod_php, restart Apache. Nginx itself does not load PHP modules, so an Nginx-only restart is insufficient when PHP-FPM is unchanged.

sudo systemctl restart apache2
sudo systemctl restart php8.3-fpm

The second command is an example of a versioned service name; use the unit present on your server rather than copying a version that is not installed.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #3
BladeHawks RGB Gaming Mouse Pad Extra Large Extended 31.5x12 Inch-Black
  • 【Large size】:Measuring 800 x 300 mm/ 31. 5×12 inches, which is wider and taller than others. Large mouse pad can perfectly fit your keyboard and mouse of any size, and there is also ample space for peripherals such as phones, tablets, etc.
  • 【LED backlight mouse pad】:Blade Hawks RGB mouse pad provides 7 static modes and 7 dynamic modes will give you the options you are looking for. Power-off memory function remembers the last lighting mode you selected. The super glow fiber Chroma will give you a colorful gaming setup that you want.
  • 【Anti-slip rubber base】:Made from Natural rubber, this gaming mousepad will firmly grip your desktop, allowing you to enjoy the ultimate precision in the games you are most passionate about. It also comes with a texture that enhances this ability even further.
  • 【Smooth and waterproof surface】: Micro-textured cloth surface, for extremely precise mouse control and a smooth movement. When liquid splashes on the gaming mouse pad, it forms water droplets and slides down. Will not delay your work or gameplay.
  • 【Plug and play】: This mouse and keyboard pad is powered by USB, plug and play, no driver required. One button control light modes. Press one time to change the lighting mode, press twice to change the brightness, press and hold about 3 seconds turn ON/OFF.

Verify from WordPress, not only from the shell

In the WordPress dashboard, open Tools → Site Health → Info and inspect the media-handling or server details exposed by your WordPress version. The result should reflect the PHP runtime used by web requests. A temporary diagnostic page that calls phpinfo() can also confirm the loaded module, but remove that page immediately because it exposes sensitive configuration.

If WordPress still reports GD instead of Imagick, compare the PHP version shown in Site Health with the version used by your shell and PHP-FPM unit. Enable Imagick in that specific configuration, restart the service, and check the PHP error log for module-load failures.

Verify every executable and its version

Run the following checks after APT and npm installation:

command -v magick || command -v convert
command -v jpegoptim optipng pngquant gifsicle cwebp avifenc svgo
magick -version 2>/dev/null || convert -version
jpegoptim --version
optipng -version
cwebp -version
avifenc --version

The first command deliberately checks both ImageMagick executable conventions. Newer package generations commonly expose magick; older ImageMagick 6 layouts commonly expose convert. Configure a plugin or script with the command that actually exists, not the one shown in an unrelated tutorial.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

When a command is missing, inspect the package state and executable paths:

dpkg -l imagemagick jpegoptim optipng pngquant gifsicle webp libavif-bin
apt-cache policy imagemagick webp libavif-bin
which magick convert jpegoptim optipng pngquant gifsicle cwebp avifenc svgo

Availability depends on the Ubuntu release and enabled repositories. Installing a package does not guarantee that a third-party plugin can find it if the plugin runs with a restricted PATH; use an absolute path in that plugin when it supports one.

Connect the tools to WordPress

Choose the image editor and optimizer deliberately

WordPress’s image editor can use Imagick when the extension is available, while an optimization plugin may invoke separate command-line programs. Read the plugin’s settings for backend selection, binary paths, quality, metadata, and format conversion. Select ImageMagick or Imagick only after confirming the corresponding PHP module is loaded.

Rank #4
Sale
Vaydeer Wrist Rest for Keyboard and Mouse, Computer Ergonomic Wrist Support Pad, Soft Memory Foam Arm Cushion for Desk, Palm Hand Office Laptop Typing
  • 【Softer and More Comfortable】Vaydeer wrist rest has unique diamond pattern, which is the combination of softness and aesthetics. The materials of wrist rest are improved into higher quality memory foam and covered with silky smooth lycra. The computer wrist rest makes you as comfortable and cushiony as like rest your wrists on clouds.
  • 【Ergonomic Wrist Saver】The wrist rests for keyboard and mouse comes with a 17.32×3.15×0.83 inch keyboard wrist pad and a 5.94×3.15×0.83 inch mouse wrist support. Based on ergonomic design, the unique concave shape is the perfect fit for your wrist joints. The wrist rest pad fits most computer keyboards and laptops, improve hand and wrist posture, release your wrist and arm stress.
  • 【Non-Slip Rubber Bottom】Featuring an anti-skid silicone base on the bottom, this wrist keyboard support stays firmly in place on your desk, preventing the padding from sliding around, ensuring stable and consistent wrist support during extended computer sessions.
  • 【Better Experience & Pain Relief】Our keyboard arm rest is beneficial to alleviate the soreness caused by direct contact and friction between your arm and a hard desk surface, reducing the risk of wrist fatigue or carpal tunnel. The soft texture of memory foam can evenly distribute the pressure around your wrists and provide good support with just enough give.
  • 【Helpful in Multiple Scenarios】Whether you're working, studying, writing, typing, gaming, this keyboard and mouse rest combo is an essential accessory to add comfort and support to your hands and wrists. It’s also a great gift for men, women, family, friend, coworker, gamer, teacher, etc.
  • For photographs, use JPEG optimization and set a quality target appropriate to the site’s visual standard.
  • For logos, screenshots, and transparent artwork, use PNG tools; choose lossless optipng when exact pixels matter and use pngquant only when palette reduction is acceptable.
  • Use GIF optimization for legacy or animated assets. Converting an animation to another format requires a plugin that understands animation frames.
  • Enable WebP or AVIF generation only when the theme, cache layer, CDN, and browser-delivery policy can serve those files correctly.
  • Enable SVG optimization only for SVG uploads that have passed the site’s security and sanitization policy.

Do not enable every conversion option at once on production. Generate one format at a time on staging, inspect the resulting files, and confirm that responsive image markup and cache invalidation still work.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Configure paths when a plugin asks for them

If a plugin has fields for executable locations, enter the output of the verification commands. Typical values are the full paths returned for cwebp, avifenc, or svgo. For ImageMagick, provide the command supported by that plugin—magick and convert are not interchangeable in every integration.

Web-server processes often run with a smaller environment than an interactive shell. A binary that works over SSH may fail from WordPress because its directory is not in the service account’s PATH. Absolute paths, correct file permissions, and a service restart usually resolve that mismatch.

Set quality and metadata policies

JPEG, PNG, and metadata

Optimization is a trade-off between bytes, visual quality, processing time, and metadata. Decide whether EXIF camera data, color profiles, copyright fields, and GPS data should remain. Removing metadata can reduce size and protect privacy, but stripping a color profile can change how an image appears. Make the policy explicit in the plugin rather than relying on a tool’s default.

Use representative images that include photographs, transparent graphics, text-heavy screenshots, and large dimensions. A setting that looks acceptable on a landscape photograph can make small text or a transparent logo unusable.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

WebP quality and lossless mode

ImageMagick’s WebP documentation specifies an important boundary: quality values of 100 or greater select lossless mode unless lossless=false is explicitly set. Therefore, a quality value of 100 is not simply “maximum lossy quality.” It can produce a substantially larger lossless file. Record the quality and lossless settings together when troubleshooting file-size changes.

Compare the encoded file with the source at the display size used by the site. File size alone is not a sufficient acceptance test; inspect text edges, gradients, transparency, and photographic detail.

Best Value
Sale
Under Desk Cable Management Tray No Drill, Metal Mesh Cable Management Under Desk with Clamp Mount, 2 Hole Cable Tray with Wire Management and Cord Organizer for Home Office Standing Desk
  • 【No Drill Mounted】Cable management tray can be assembled in as little as 3 minutes or less-simply. Side clips easily clampe the edge of desk, pass through the holes on the sides, and secure excess cables with baskets. Desk cable management supports inward or outward installation to meet your needs in different scenarios, and provides you with great convenience when collecting and organizing wires.
  • 【Rubber Pad Protects Desk】Wire organizer under desk built-in soft rubber pads on the clamp protect your desk from scratches, so you will not damage your furniture or office.
  • 【Sturdy and Beautiful】Cord management under desk is made of high-quality carbon steel and holds about 15 lbs. The wire basket has 2 holes on each side of the tray to enable your cables to pass freely. Cable baskets are suitable for desk thickness use from 0.4" to 2.4".
  • 【Space Saving & Keep Organized】Desk cable management tray holds all your power cords, outlet strips, USB hubs and computer transformers hidden from your feet, and the data cables will not enter the vacuum cleaner to keep your desk clean and tidy. Desk wire organizer is also suitable for use in the kitchen and outdoors.
  • 【Reduce Safety Risks】Cable tray under desk keeps all plugs away from your kids, no more worry about tripping. Using 2 holes wire tray saves extra space, helps you easily cabling and wire protection. The mesh design is not easy to accumulate dust, but avoids safety accidents caused by messy wires.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Test the complete upload path

  1. On staging, record the current PHP version, active image editor, and plugin settings.
  2. Upload a JPEG photograph and verify that the original, resized derivatives, and optimized output are created in the expected uploads directory.
  3. Upload a transparent PNG and check that alpha transparency survives. Compare a lossless and palette-reduced result if both tools are enabled.
  4. Upload a WebP source or create a WebP derivative, then confirm that the generated file opens and is referenced by the site’s markup or delivery layer.
  5. If AVIF is enabled, encode and request an AVIF derivative from a browser that supports it, then verify the fallback image for browsers that do not.
  6. If SVG is enabled, test a sanitized, non-sensitive SVG and confirm that optimization does not remove required dimensions, viewBox data, or accessibility attributes.
  7. Check PHP, web-server, and plugin logs immediately after each upload. A successful WordPress upload with no optimized derivative usually indicates a plugin configuration, permission, or command-path problem.
  8. Inspect the response headers and cache behavior after changing formats. A stale CDN or page cache can make a correct new derivative appear to be missing.

The installation evidence establishes package roles and command availability; it does not provide independent benchmark results. Use your own staging samples to choose quality values and confirm browser delivery.

Troubleshoot common failures

“Unable to locate package”

  • Run sudo apt update again and read repository errors.
  • Confirm the Ubuntu release and that the required repository components are enabled for that release.
  • Check availability with apt-cache policy package-name, replacing package-name with the missing package.
  • Do not substitute a similarly named binary until you confirm that the plugin supports it.

ImageMagick command not found

Run command -v magick || command -v convert. If only convert exists, configure the integration for that executable. If neither exists, inspect the installed package with dpkg -L imagemagick and reinstall the package if necessary.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

WebP or AVIF conversion fails

Check that cwebp comes from the installed webp package and that avifenc comes from libavif-bin. Run each version command as the same operating-system user that performs the conversion. Then verify write permissions on the WordPress uploads directory and review the plugin’s configured path.

Imagick is installed but WordPress does not use it

Compare CLI PHP, PHP-FPM, and WordPress Site Health versions. Enable the extension in the web runtime’s configuration, restart that runtime, and check for startup errors. A module loaded for one PHP version is invisible to another version.

Uploads time out or consume excessive memory

Large images and multi-frame GIFs require more CPU and memory than small JPEGs. Process a reduced maximum dimension where the plugin allows it, avoid generating unnecessary formats, and monitor PHP memory and execution limits. Do not raise limits blindly; first identify whether ImageMagick, an encoder, or the plugin is consuming resources.

PDF thumbnails are missing

Ghostscript is relevant when ImageMagick/Imagick must render PDF pages as thumbnails. Install and configure it only for that requirement, then test PDF handling separately from ordinary image uploads. Keep PDF policy and upload security controls independent from image optimization.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Choose a toolchain for your site

Requirement Minimum components Decision to make
JPEG photographs ImageMagick and jpegoptim Set an acceptable quality and metadata policy.
Lossless PNG graphics optipng Preserve exact pixels and transparency.
Smaller palette PNGs pngquant Accept controlled color reduction for lower byte size.
GIF files gifsicle Decide whether animation must remain intact.
WebP delivery webp, Imagick or a compatible plugin Provide a fallback and test cache and browser behavior.
AVIF delivery libavif-bin, compatible plugin and delivery layer Use only where the site’s compatibility policy supports it.
SVG files Node.js/npm and SVGO Sanitize uploads before optimization and preserve accessibility data.
PDF thumbnails ImageMagick/Imagick plus Ghostscript Install Ghostscript only when PDF rendering is required.

When you do not want to maintain Ubuntu packages, a managed WordPress host may expose Imagick/ImageMagick, WebP, and AVIF capabilities as part of its server configuration. Confirm the actual PHP modules, executable availability, upload limits, and format-delivery behavior with the provider before migrating; capability names alone do not prove that a particular plugin can use them.

Maintenance after installation

  • Apply normal Ubuntu security updates and review image-tool changes before deploying them to production.
  • Keep a record of the active PHP version, ImageMagick executable name, encoder paths, and plugin settings.
  • Retest one file of each enabled format after PHP, Ubuntu, ImageMagick, or plugin upgrades.
  • Monitor disk usage: retaining originals plus JPEG, WebP, and AVIF derivatives can multiply media-storage requirements.
  • Limit upload permissions and sanitize SVG content; optimization tools are not substitutes for WordPress security controls.
  • Document rollback steps, including how to disable a failing conversion format without deleting the original media library.

Installation checklist

  • APT refreshed: sudo apt update completed without repository errors.
  • Core packages installed: ImageMagick, JPEG, PNG, GIF, WebP, and AVIF tools match the formats the site actually needs.
  • SVG decision recorded: SVGO is installed through npm only if sanitized SVG optimization is part of the workflow.
  • Imagick verified: the PHP extension is loaded by the same runtime that serves WordPress.
  • Services restarted: the active PHP-FPM or Apache service has reloaded the extension.
  • Executables found: command -v and version checks succeed for every configured tool.
  • Plugin configured: backend selection, absolute paths, quality, metadata, and output formats are explicit.
  • Staging tested: JPEG, PNG, WebP, and optional AVIF uploads produce valid files and correct browser fallbacks.
  • Operations planned: logs, storage growth, updates, and rollback are monitored after deployment.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.