About Image to PNG Converter
Image to PNG Converter is a WordPress plugin that adds a drag-and-drop image converter to any page, post or widget through the Convert your images to PNG right inside your browser. Nothing is ever uploaded to a server. shortcode. Visitors drop, choose or paste a JPG, JPEG, PNG, WEBP, GIF or BMP file, choose what should end up in the PNG, and download the result under the original filename with a Convert Any Image to PNG
.png extension.
Everything happens on the visitor’s own device. Decoding, selection and PNG encoding use the browser’s Canvas API (drawImage and canvas.toBlob), so the image is never uploaded to your server or to any third party, and the plugin stores nothing in your database. Rectangle Crop and Freehand Lasso make no network requests at all. The two AI modes, Auto Subject Extraction and AI Click Select, download a model to the browser the first time they are used and then run it locally; the picture itself still never leaves the device.
The plugin is open source, released under the GPL-2.0-or-later licence. It uses no build tools, no npm and no jQuery, and its stylesheet and script are enqueued only on pages that actually contain the shortcode.
Version 1.3.0 GPL-2.0-or-later WordPress 5.6 or later Tested up to WordPress 6.6 PHP 7.0 or later
Runs in the browser
Selection and conversion are done with the Canvas API on the visitor’s device. Nothing is sent to your server, and nothing is written to your database. The selection is stored in the source image’s own pixel coordinates, so the crop is exact on a desktop and on a phone alike.
Open source
Released under GPL-2.0-or-later. All PHP lives in one ITPNGC_-prefixed class, all CSS is scoped under .itpngc-wrap, and every string passes through WordPress translation functions with the image-to-png-converter text domain, so it can be reworded or translated.
Light on your site
No build tools, no npm, no jQuery. Assets load only where the shortcode renders, and the optional AI models are requested only when a visitor actually uses an AI mode. Set ai="no" and sam="no" and the tool is completely offline.
Changelog
Version 1.3.0 Latest
- Added a fourth selection mode, AI Click Select: click an object and a Segment Anything style model (SlimSAM via Transformers.js) outlines it, then exports it cropped to its bounding box with real per-pixel transparency.
- The image encoder runs once per image and is cached, so repeat clicks and mode switches do not re-run it.
- New
sam,sam_model,sam_deviceandsam_urlshortcode attributes. - Mode buttons renamed for clarity: Rectangle Crop, Freehand Lasso, Auto Subject Extraction, AI Click Select.
Version 1.2.0
- Added a selection-mode switcher with three modes.
- New freehand selection: draw an outline, export the inside with a transparent background trimmed to the outline’s bounding box.
- New optional Smart (AI) selection: automatic subject detection and background removal via @imgly/background-removal, run entirely on the visitor’s device and loaded on demand so it costs nothing on pages where it is not used.
- New
ai,ai_modelandai_urlshortcode attributes. - Smart mode degrades to a clear message plus the two offline modes whenever the library cannot be loaded or the browser cannot run it.
Version 1.1.0
- Added a visual crop step before conversion: a draggable, resizable selection box with a live pixel-size readout, a “Reset selection” button and a “Confirm and Convert to PNG” button.
- Mouse, touch and keyboard support for the selection box.
- The maximum-size check now applies to the selected area rather than the whole image, so a region can be taken out of a very large photo.
Version 1.0.0
- Initial release.
Credits
The plugin itself depends only on WordPress and the browser’s built-in Canvas API. The two AI modes lean on third-party open-source projects that the visitor’s browser fetches at runtime; nothing from them is bundled inside the plugin ZIP. The components, where they come from and the licence each is published under are listed below, as stated in the plugin README.
| Component | Used by | Fetched from | Licence |
|---|---|---|---|
| Image to PNG Converter (this plugin) | All four modes | Your own WordPress site | GPL-2.0-or-later |
@imgly/background-removal 1.7.0, with its isnet_quint8 (default, about 44 MB), isnet_fp16 and isnet models |
Auto Subject Extraction | cdn.jsdelivr.net (the library, as the pinned +esm build) and staticimgly.com (model and WebAssembly files) |
AGPL-3.0 |
| Transformers.js 3.5.0 | AI Click Select | cdn.jsdelivr.net | Apache-2.0 |
Xenova/slimsam-77-uniform (SlimSAM model, about 38 MB: vision_encoder.onnx 22.2 MB and prompt_encoder_mask_decoder.onnx 15.8 MB) |
AI Click Select | huggingface.co, with the weights served from cdn-lfs*.huggingface.co | Apache-2.0 |
AI Click Select also pulls in roughly 4 MB of ONNX Runtime WebAssembly from cdn.jsdelivr.net alongside Transformers.js. Both AI modes cache their downloads in the browser (Transformers.js uses the browser’s Cache Storage), so a returning visitor does not pay for the download again. If you run a strict Content-Security-Policy, allow cdn.jsdelivr.net and staticimgly.com for Auto Subject Extraction, and cdn.jsdelivr.net and huggingface.co (plus cdn-lfs*.huggingface.co) for AI Click Select. Rectangle Crop and Freehand Lasso use nothing from this table, and passing ai="no" or sam="no" to the shortcode removes the corresponding mode and its downloads entirely.
A note on licences. @imgly/background-removal is released under the AGPL-3.0. Because the plugin neither bundles nor redistributes it, and the visitor’s browser fetches it from a CDN at runtime, the plugin’s own GPL-2.0-or-later licence is unaffected. If you intend to redistribute a bundled copy, or you cannot accept AGPL terms in your project, IMG.LY sell a commercial licence. Transformers.js and the default SlimSAM model are both Apache-2.0, which makes AI Click Select materially easier to live with. None of this is legal advice; take your own advice on it before enabling the AI modes on a public site.
Still have questions? The FAQ answers the most common questions about privacy, file sizes, browser support and the AI modes. If you have found a problem or would like to suggest a feature, the contact page is the place to reach us.