Enable Media Replace
A free, lightweight and easy to use plugin that allows you to seamlessly replace an image or file in your Media Library by uploading a new file in its place. No more deleting, renaming and re-uploading files! Now fully compatible with WP Offload Media! New beta feature! You can now remove the background of your images for better integration with eCommerce solutions! Supported by the friendly team that created ShortPixel 🙂 A real timesaver Don’t you find it tedious and complicated to first delete a file and then upload another one with the exact same name every time you want to update an image or other uploaded file in the WordPress media library? Well, no longer! Now you can replace any uploaded file in the Edit Media view, where it should be. Replacing Media can be done in two ways: It’s simple to replace a file Simply replace the file. This option requires you to upload a file of the same type as the file you want to replace. The attachment name remains the same regardless of what the file you upload is called. Replace the file, use the new file name, and update all links. If you check this option, the old file will be replaced with the name and type of the file you are uploading. All links pointing to the current file will be updated to point to the new file name. Additional options for the folder to put the new file in or the date of the new file are also available on the replace screen. This plugin is very powerful and a must-have for all major websites built with WordPress. It also offers a preview of the replaced image! New beta feature: You can now remove the background of any image! Similar to replacing media, you can also remove the background of the images from the Media Library! The background removal feature sends the images to ShortPixel’s API, removes the background and sends them back in a preview window. If everything looks good, just replace the image with the one that has the background removed! If the source image is a PNG file, you will get a transparent background, while the other images default to a solid white background. You also have the option to choose a different color with an embedded color picker. The background removal feature is still in beta and will be free of charge for a reasonable usage. If you don’t want to use the background removal feature, add this line to your theme’s functions.php file, or use a plugin like Code Snippets: `add_filter( 'emr/feature/background', '__return_false' );``` A similar filter, for the remote notification system is: `add_filter( 'emr/feature/remote_notice', '__return_false' );``` To shorten the wait time before redirecting to the media editing screen, use the following filter and specify the wait time in seconds (0 means that redirection is immediate, but may cause problems in certain configurations): `add_filter('emr/success/timeout', function () { return 3; });``` To set “Just replace the file” as the default replacing method, use the following filter: `add_filter( 'emr/replace/default_type', function() { return 'replace'; } );“` To set “Replace the file, use the new file name, and update all links” as the default replacing method, use the following filter: `add_filter( 'emr/replace/default_type', function() { return 'replace_and_search'; } );“` Show file modification time There is a shortcode that takes the file modification date and displays it in a post or on a page. The code is: [file_modified id=XX format=XXXX] where the “id” is required and the “format” is optional and defaults to your current WordPress settings for date and time format. So [file_modified id=870] would show the last time the file with ID 870 was updated on your site. To get the ID for a file, check the URL when editing a file in the media library (see screenshot #4) If you want more control over the format in which the time is shown, you can use the format option. So [file_modified id=870 format=Y-m-d] would show the date the file was modified but not the time. The format string uses the standard PHP date() formatting tags. Other plugins by ShortPixel: FastPixel Caching – WP Optimization made easy ShortPixel Image Optimizer – Image optimization & compression for all the images on your website, including WebP & AVIF delivery ShortPixel Adaptive Images – On-the-fly image optimization & CDN delivery Resize Image After Upload – Automatically resize each uploaded image reGenerate Thumbnails Advanced – Easily regenerate thumbnails WP SVG Images – Secure upload of SVG files to Media Library Get in touch! Email https://shortpixel.com/contact Twitter https://twitter.com/shortpixel Facebook https://www.facebook.com/ShortPixel LinkedIn https://www.linkedin.com/company/shortpixel Wishlist / Coming attractions Do you have suggestions? Feel free to contact ShortPixel here Contribute Want to help us improve the plugin feel free to submit PRs via GitHub here.
Top keywords
- file32×3.87%
- replace12×1.45%
- image11×1.33%
- background10×1.21%
- media10×1.21%
- shortpixel10×1.21%
- filter9×1.09%
- time8×0.97%
- format7×0.85%
- images7×0.85%
- add6×0.73%
- id6×0.73%
Smush – Image Optimization, Compression, Lazy Load, WebP & CDN
Compress images, optimize images, and enable image lazy load automatically with the powerful Smush image optimizer to keep your WordPress site fast, without losing quality. Smush makes it easy to optimize images, compress images, and deliver images faster across your entire WordPress site. This all-in-one image optimizer automatically reduces image file sizes, enables image lazy load, and serves modern formats like WebP and AVIF, all without breaking image quality or adding extra work. Whether you’re running a blog, store, or portfolio, Smush helps you optimize images at scale and keep your site fast with a trusted WordPress image optimizer. Trusted by 1+ Million Sites | 4.8/5 Star Rating Get everything you need to optimize images and speed up your site. Smush works out of the box with no complicated setup – just install and let it handle the rest. Compress images without losing quality Reduce image file size automatically while keeping your images sharp and clear. Smush is an easy-to-use image optimizer which let’s you compress images using both lossless and lossy compression, giving you the best balance of quality and performance without extra work. You can also compress images outside the media library using Directory Smush, making it easy to optimize images stored in theme folders, plugins, or other directories on your server. Lazy load images for faster pages Enable image lazy load across your site so images load only when needed. This image optimizer improves initial page speed and creates a smoother experience for visitors without extra configuration. Serve WebP and AVIF images automatically (PRO) Convert images to WebP and AVIF and serve them automatically to supported browsers. Smush helps you optimize images using next-gen formats to reduce file size and improve load times across your WordPress site. Deliver images faster with an Image CDN (PRO) Serve images through a global image CDN to reduce latency and improve load times for visitors around the world. 119 global CDN servers Up to 500 GB of bandwidth Faster image delivery based on visitor location Improved performance for image-heavy and high-traffic sites Automatically resize and fix image dimensions (PRO) Eliminate common PageSpeed warnings and improve layout stability with automatic image sizing. Smush dynamically resizes images to perfectly fit their containers, regardless of original size, helping fix the “Properly size images” warning in Google PageSpeed Insights. It also automatically adds missing width and height attributes to your images, improving rendering speed and reducing layout shifts. This helps you meet the “Ensure images have explicit width and height” recommendation without any manual work. Optimize your entire site, automatically Smush works across your whole site as a powerful image optimizer to optimize images as you upload them and maintain performance over time without manual work. Optimize images automatically on upload Compress images in bulk or individually Works with your existing media library No need to re-upload images Enable image lazy load across your site Convert images to WebP and AVIF Deliver images with an integrated image CDN Automatically resize and serve correctly sized images Optimize images outside the media library with Directory Smush Built for performance Smush improves page speed and overall performance by reducing image weight and improving how images are delivered. Reduce page load times Improve user experience Better performance for image-heavy pages Supports image lazy load and preload images (PRO) for faster perceived performance Works with your existing setup Smush is built to work with your current WordPress setup, including popular themes, page builders, and plugins. Compatible with Gutenberg, Elementor, WPBakery, and more Works with WooCommerce stores No need to change your workflow Easy to enable and configure Designed to be simple You don’t need to be a performance expert to optimize images with Smush image optimizer. Works out of the box Simple settings when you need them No technical knowledge required Safe to use on any site Why choose Smush? There are plenty of image optimization plugins, but Smush focuses on making it easy to optimize images, compress images, and improve performance without complexity. As a leading WordPress image optimizer, Smush gives you powerful optimization tools without the technical hassle. Trusted by over 1 million WordPress users Built specifically for WordPress Regular updates and improvements Backed by the WPMU DEV team Get started in minutes Install Smush, activate it, and start to compress images, optimize images, and enable image lazy load right away. This easy-to-use image optimizer helps most sites see improvements immediately without changing how they upload or manage images. About Us WPMU DEV is a premium supplier of quality WordPress plugins, services and support. Learn more here: https://wpmudev.com/ Don’t forget to stay up to date on everything WordPress from the Internet’s number one resource: WPMU DEV Blog Hey, one more thing… we hope you enjoy our free offerings as much as we’ve loved making them for you! Contact and Credits Originally written by Alex Dunae at Dialect (dialect.ca, e-mail ‘alex’ at ‘dialect dot ca’), 2008-11.