This free image compressor widget lets visitors make JPG, PNG and WebP images smaller without leaving your website. Paste one short code, and your page gets a working compressor with a quality slider, bulk files and ZIP download. It runs in each visitor’s browser, so you pay nothing for servers. Try it below and copy the code.
Live preview – this is the real widget. Try it.
Customise your widget
The widget grows and shrinks to fit its content automatically, so visitors never see a scroll bar inside it.
Free forever. No sign-up, no API key, no ads inside the widget. Paste it into any page (WordPress: Custom HTML block).
What the Image Compressor widget does
The widget is the same compressor that runs on our Image Compressor page, packed into a frame you can place anywhere. Visitors drop their images, see the old and new size of each file, and download the lighter copies. In short, it gives them:
- A quality slider (75 by default) that re-compresses as soon as it moves.
- Output in the same format, or as JPG, WebP or PNG.
- PNG compression by smart colour reduction, which keeps transparent backgrounds.
- Many images at once, with one-click ZIP download.
- iPhone HEIC photos as input, and a promise never to return a file bigger than the original.
Lossy and lossless compression, typical savings per format and more tips are explained on the Image Compressor tool page, so this page focuses on putting the tool on your site.
Who should add a image compressor widget to their website
Any site whose visitors deal with heavy photos can use it. These are the places where it helps the most:
- Web design and SEO blogs – an article about page speed or Core Web Vitals is more useful when readers can compress their images right below the advice.
- Forums and community sites – if your forum rejects attachments above 2 MB, put the widget on the “how to upload” help page and the number of failed uploads drops.
- Real estate listing sites – agents often upload ten or twenty phone photos per property. A compressor on the “add listing” guide saves them time and saves you storage.
- School and college websites – students submitting photos for ID cards, magazines or online forms can shrink them on the school’s own page.
How your visitors use it
- The visitor clicks Choose images in the widget or drops photos onto it.
- Each image is compressed at quality 75, and the new size is shown next to the old one.
- If they want a smaller file or more detail, they move the slider and the result updates.
- They download each image, or all of them together as a ZIP, and continue on your site.
How to add the Image Compressor widget to your website
Set the colour and size in the box above, click Copy code, then paste the code where the Image Compressor widget should appear. It is plain HTML (an iframe, one credit line and a tiny height script), so you need no account, API key or plugin.
| Platform | Where to paste the code |
|---|---|
| WordPress | Add a Custom HTML block and paste. Elementor: HTML widget. Classic editor: Text tab. |
| Blogger | Post editor in HTML view, or Layout › Add a Gadget › HTML/JavaScript for every page. |
| Wix | Add › Embed Code › Embed HTML, paste, then set the box height yourself (about 650–750 px). |
| Shopify | Online Store › Pages › Show HTML (<>), or a Custom Liquid section in the theme editor. |
| Google Sites | Insert › Embed › Embed code, then drag the box tall enough for the whole tool. |
| Any HTML site | Paste anywhere inside <body>. No jQuery or other library needed. |
Where to put it: A good spot is right after the paragraph where you mention upload limits or page speed. Most sites place it near their own upload form, so visitors can fix a file before trying again. To remove the widget later, simply delete the code.
Customise the Image Compressor widget
| Setting | Options | Tip for the Image Compressor widget |
|---|---|---|
| Button colour | Any colour (colour picker) | Use your main brand colour; the Choose images and Download buttons will take it. |
| Maximum width | 760 px (recommended), 600 px, 480 px for sidebars, or full width | 760 px suits an article column. Use 480 px if you place it in a forum sidebar. |
| Starting height | 480, 560 (recommended) or 680 px | 560 px is right for the empty widget. It grows on its own when visitors add files. |
Size and mobile
The widget is 100% wide up to the maximum width you choose, so it shrinks to fit any phone screen. The quality slider works with touch. When a visitor adds twenty images, the widget grows to show them all, and it shrinks back when they clear the list, so there is never a scroll bar inside the box.
Light on your page and always up to date
The iframe uses lazy loading, so the browser only loads the widget when a visitor scrolls near it. Inside the widget there are no ads, no analytics and no tracking scripts. The compressor’s small helper for PNG files is only downloaded when a visitor actually compresses a PNG, so a reader who just scrolls past pays almost nothing.
You never have to update anything. When we improve the compressor, for example with better PNG results or a new output format, every site that uses the widget gets the change automatically the next time the page loads.
When the Image Compressor widget is not the right fit
- It does not compress the images already on your website. For your own media library, use a WordPress image plugin or compress the files before you upload them.
- If visitors need an exact limit such as “under 50 KB”, the Resize Image in KB widget is the better choice, because it targets a size instead of a quality.
- Very large batches (hundreds of camera photos) depend on the visitor’s device memory. Older phones may need smaller batches.
- On Wix and Google Sites the widget cannot resize itself, because those builders keep embedded code in a closed frame. Set a fixed height there.
Privacy for your visitors
Visitors’ images are compressed inside their own browser. They are not uploaded to our server or to yours, so there is nothing to store, secure or mention in a data-processing note. The widget needs no sign-up, sets no cookies and shows no ads. This matters on school and forum sites, where people often compress personal photos.
Is the image compressor widget really free?
Yes. It is free with no limits on visitors or images, no API key and no premium plan. The only thing we ask is that you keep the small credit line under the widget.
Are visitors’ images uploaded anywhere?
No. Compression runs in the visitor’s browser. The images never reach our server or your server.
Will the widget slow down my website?
No. The iframe is lazy-loaded, has no ads or trackers, and the heavy work happens only after a visitor chooses an image.
Can I change the colour to match my site?
Yes. Pick any button colour in the settings above and copy the updated code. You can also choose the width and starting height.
Does it work on mobile phones?
Yes. It works in modern browsers on Android phones, iPhones, tablets and computers, including touch control for the slider.
Which formats can visitors compress?
JPG, PNG and WebP, plus iPhone HEIC photos as input. They can keep the format or save as JPG, WebP or PNG.