Halloween Sale 15% off Ends in See the plans

Snippet Library

Media snippets for WordPress

Snippets for the Media Library and uploads: allow SVG or other file types, rename and limit uploads, add image sizes, categories for media and alt text helpers. For content teams and developers who handle a lot of images and files.

1–3 of 3 snippets “version”

  • HTML Media

    Image Magnifier Lens on Hover

    Shows a round magnifying lens over chosen images as visitors move the mouse across them, using the largest version of the image available. Opt in per image with a CSS class.

  • PHP Media

    Replace a Media File and Keep Its URL

    Adds a "Replace file" box to the media edit screen that uploads a new version of an image, PDF or other file over the old one, keeping the same address so every link and embed updates at once.

  • PHP Media

    Save JPEG and PNG Uploads as WebP

    Makes WordPress generate WebP versions instead of JPEG and PNG for every image size it creates on upload, which usually cuts image weight by a quarter or more.

Have a snippet worth sharing?

Publish it to the library from WPIDE or right here. Sign in with any WordPress site that runs WPIDE, free or Pro. Public snippets are reviewed by the WPIDE team before they appear.