{"id":414063,"date":"2026-11-30T18:39:52","date_gmt":"2026-11-30T18:39:52","guid":{"rendered":"https:\/\/wordpress.org\/plugins\/karina-image-optimizer\/"},"modified":"2026-11-30T18:39:26","modified_gmt":"2026-11-30T18:39:26","slug":"karina-image-optimizer","status":"publish","type":"plugin","link":"https:\/\/br.wordpress.org\/plugins\/karina-image-optimizer\/","author":18000329,"comment_status":"closed","ping_status":"closed","template":"","meta":{"version":"1.4.0","stable_tag":"1.4.0","tested":"7.1.5","requires":"5.8","requires_php":"7.4","requires_plugins":null,"header_name":"Karina Image Optimizer","header_author":"Mohsen Hasanpour","header_description":"Automatically optimize images on upload via an external API: keep their format or convert them to WebP.","last_updated":"2026-11-30 18:39:26","external_support_url":"","external_repository_url":"","donate_link":"","header_plugin_uri":"https:\/\/karinaco.net\/","header_author_uri":"https:\/\/mohsen-hasanpour.ir","rating":0,"author_block_rating":0,"active_installs":0,"downloads":58,"num_ratings":0,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq","changelog"],"tags":{"1.4.0":{"tag":"1.4.0","author":"mohsenhasanpour","date":"2026-11-30 18:39:26","revision":3835914}},"upgrade_notice":{"1.4.0":"<p>Imagepress is now Karina Image Optimizer. Install it, then deactivate and delete Imagepress: your settings and image data are moved over automatically.<\/p>","1.3.2":"<p>Fixes &quot;Operation timed out&quot; on large images. If you lowered the API timeout to fit a 30-second PHP limit, set it back to 60 seconds.<\/p>","1.3.1":"<p>Large batches of existing images keep going through temporary API errors (such as HTTP 502) instead of pausing.<\/p>","1.3.0":"<p>You can now optimize just the featured images of posts and products \u2014 the safest way to convert existing images to WebP.<\/p>","1.2.0":"<p>Adds optimization of existing images. Nothing changes until you start it from Settings \u2192 Karina Image Optimizer.<\/p>","1.1.0":"<p>Images now keep their original format by default. To keep converting to WebP, choose &quot;Convert to WebP&quot; under Settings \u2192 Karina Image Optimizer.<\/p>","1.0.0":"<p>First release.<\/p>"},"ratings":[],"assets_icons":{"icon-128x128.png":{"filename":"icon-128x128.png","revision":3835914,"resolution":"128x128","location":"assets","locale":"","width":128,"height":128},"icon-256x256.png":{"filename":"icon-256x256.png","revision":3835914,"resolution":"256x256","location":"assets","locale":"","width":256,"height":256}},"assets_banners":{"banner-1544x500-rtl.png":{"filename":"banner-1544x500-rtl.png","revision":3835914,"resolution":"1544x500","location":"assets","locale":"","width":1544,"height":500},"banner-1544x500.png":{"filename":"banner-1544x500.png","revision":3835914,"resolution":"1544x500","location":"assets","locale":"","width":1544,"height":500},"banner-772x250-rtl.png":{"filename":"banner-772x250-rtl.png","revision":3835914,"resolution":"772x250","location":"assets","locale":"","width":772,"height":250},"banner-772x250.png":{"filename":"banner-772x250.png","revision":3835914,"resolution":"772x250","location":"assets","locale":"","width":772,"height":250}},"assets_blueprints":{},"all_blocks":[],"tagged_versions":["1.4.0"],"block_files":[],"assets_screenshots":{"screenshot-1.png":{"filename":"screenshot-1.png","revision":3835914,"resolution":"1","location":"assets","locale":"","width":1280,"height":1400},"screenshot-2.png":{"filename":"screenshot-2.png","revision":3835914,"resolution":"2","location":"assets","locale":"","width":1280,"height":940},"screenshot-3.png":{"filename":"screenshot-3.png","revision":3835914,"resolution":"3","location":"assets","locale":"","width":762,"height":350}},"screenshots":{"1":"Settings screen with connection, optimization, statistics and server check.","2":"Savings column in the Media Library.","3":"Optimizing existing images in the background."}},"plugin_section":[],"plugin_tags":[56174,249014,29161,84,15376],"plugin_category":[50],"plugin_contributors":[241549],"plugin_business_model":[],"class_list":["post-414063","plugin","type-plugin","status-publish","hentry","plugin_tags-compress-images","plugin_tags-convert-to-webp","plugin_tags-image-optimization","plugin_tags-media","plugin_tags-webp","plugin_category-media","plugin_contributors-mohsenhasanpour","plugin_committers-mohsenhasanpour"],"banners":{"banner":"https:\/\/ps.w.org\/karina-image-optimizer\/assets\/banner-772x250.png?rev=3835914","banner_2x":"https:\/\/ps.w.org\/karina-image-optimizer\/assets\/banner-1544x500.png?rev=3835914","banner_rtl":false,"banner_2x_rtl":false},"icons":{"svg":false,"icon":"https:\/\/ps.w.org\/karina-image-optimizer\/assets\/icon-128x128.png?rev=3835914","icon_2x":"https:\/\/ps.w.org\/karina-image-optimizer\/assets\/icon-256x256.png?rev=3835914","generated":false},"screenshots":[{"src":"https:\/\/ps.w.org\/karina-image-optimizer\/assets\/screenshot-1.png?rev=3835914","caption":"Settings screen with connection, optimization, statistics and server check."},{"src":"https:\/\/ps.w.org\/karina-image-optimizer\/assets\/screenshot-2.png?rev=3835914","caption":"Savings column in the Media Library."},{"src":"https:\/\/ps.w.org\/karina-image-optimizer\/assets\/screenshot-3.png?rev=3835914","caption":"Optimizing existing images in the background."}],"raw_content":"<!--section=description-->\n<p>Karina Image Optimizer (formerly Imagepress) optimizes every image you upload before WordPress creates any thumbnails. You choose the output:<\/p>\n\n<ul>\n<li><strong>Keep the original format (default):<\/strong> a JPEG stays a JPEG and a PNG stays a PNG, with the same file name and URL, just smaller. Compression is lossless first.<\/li>\n<li><p><strong>Convert to WebP:<\/strong> every image becomes an optimized <code>.webp<\/code> file, usually the smallest result.<\/p><\/li>\n<li><p><strong>Automatic:<\/strong> JPEG, PNG, BMP and WebP uploads (and GIF, if you enable it) are optimized as you upload them. This works in the Media Library, the block editor, <code>media_sideload_image()<\/code> and WP-CLI.<\/p><\/li>\n<li><strong>Clean:<\/strong> the original file is replaced. Every thumbnail size is generated from the optimized version, so no unoptimized copies are left on your server.<\/li>\n<li><strong>Safe:<\/strong> if the API is unreachable, slow or returns an error, the upload continues with the original image. Uploads never break.<\/li>\n<li><strong>Smart:<\/strong> files are kept as they are when the optimized version would not be smaller (optional), and animated GIF\/WebP files are never converted to WebP.<\/li>\n<li><strong>Existing images too:<\/strong> a background queue optimizes images uploaded before Karina Image Optimizer was active. You can pause, resume and cancel it, and it keeps running via WP-Cron when you close the page. In WebP mode, links in your posts are updated and old file URLs redirect to the new files.<\/li>\n<li><strong>Native:<\/strong> a settings screen under <em>Settings \u2192 Karina Image Optimizer<\/em> with a connection test, statistics and a server compatibility check. The Media Library list view shows the saving for each image and has an \"Optimize\" row action and bulk action.<\/li>\n<\/ul>\n\n<p>Karina Image Optimizer needs an account with an image optimization API. By default it is set up for the <a href=\"https:\/\/karinaco.net\/\">Karina<\/a> image optimization API, and you can point it at any compatible endpoint.<\/p>\n\n<ul>\n<li><strong>Get your API key:<\/strong> <a href=\"https:\/\/karinaco.net\/dashboard\/tokens\">karinaco.net\/dashboard\/tokens<\/a><\/li>\n<li><strong>Buy tokens:<\/strong> each optimized image uses tokens from your balance. See <a href=\"https:\/\/karinaco.net\/pricing\">karinaco.net\/pricing<\/a> for plans and token packs.<\/li>\n<\/ul>\n\n<h4>Languages<\/h4>\n\n<p>Karina Image Optimizer is available in English and Persian (\u0641\u0627\u0631\u0633\u06cc). Translations, including Persian (fa_IR), are installed automatically from translate.wordpress.org, and the plugin is right-to-left (RTL) ready.<\/p>\n\n<h3>External services<\/h3>\n\n<p>This plugin connects to an external image optimization API to optimize your images (and, if you choose, convert them to WebP). <strong>Nothing is sent until you enter an API key<\/strong> on the settings screen.<\/p>\n\n<ul>\n<li><strong>What is sent and when:<\/strong> each time a user who can upload files (or WP-CLI) uploads a supported image, the image file, its file name and the requested output format (keep or WebP) are sent to the configured endpoint, along with your API key in the <code>Authorization<\/code> header and a User-Agent containing the plugin and WordPress versions. When an administrator starts optimizing existing images (or uses the \"Optimize\" action in the Media Library), those images are sent the same way, one request per image, in the background. The \"Test connection\" button sends one request that contains no image. Nothing is sent at any other time.<\/li>\n<li><strong>Default service:<\/strong> Karina image optimization API, <code>https:\/\/karinaco.net\/api\/v1\/image\/optimize<\/code>, provided by Karina.\n\n<ul>\n<li>Terms of service: <a href=\"https:\/\/karinaco.net\/terms?lang=en\">https:\/\/karinaco.net\/terms?lang=en<\/a><\/li>\n<li>Privacy policy: <a href=\"https:\/\/karinaco.net\/privacy?lang=en\">https:\/\/karinaco.net\/privacy?lang=en<\/a><\/li>\n<li>Images are processed on Karina's own servers and are not passed to third parties. The uploaded original is discarded as soon as the request ends. The optimized result is kept for about 60 minutes (so that re-sending the same image, for example after a timeout, is not charged twice) and then deleted automatically.<\/li>\n<li>For quota, billing and support, Karina logs each request (account, API key, the requesting server's IP address, file name, size and type, result, tokens charged and User-Agent) for 90 days. The image itself is not stored in this log.<\/li>\n<\/ul><\/li>\n<li>If you change the endpoint, images are sent to the service you configured instead, and that service's own terms and privacy policy apply.<\/li>\n<\/ul>\n\n<!--section=installation-->\n<ol>\n<li>Upload the <code>karina-image-optimizer<\/code> folder to <code>\/wp-content\/plugins\/<\/code>, or install the plugin from <em>Plugins \u2192 Add New<\/em>.<\/li>\n<li>Activate it.<\/li>\n<li>Get your API key from your dashboard at <a href=\"https:\/\/karinaco.net\/dashboard\/tokens\">karinaco.net\/dashboard\/tokens<\/a>. If you need more tokens, buy them at <a href=\"https:\/\/karinaco.net\/pricing\">karinaco.net\/pricing<\/a>.<\/li>\n<li>Go to <em>Settings \u2192 Karina Image Optimizer<\/em>, enter your API key, and click <strong>Test connection<\/strong>.<\/li>\n<li>Choose the output format: keep the original format (default) or convert to WebP.<\/li>\n<li>Upload an image. It is stored smaller, in the format you chose.<\/li>\n<\/ol>\n\n<p>To keep the key out of the database, define it in <code>wp-config.php<\/code> instead:<\/p>\n\n<pre><code>define( 'KARINA_IO_API_KEY', 'your-key' );\n<\/code><\/pre>\n\n<!--section=faq-->\n<dl>\n<dt id=\"i%20used%20imagepress.%20what%20happens%20to%20my%20settings%3F\"><h3>I used Imagepress. What happens to my settings?<\/h3><\/dt>\n<dd><p>Karina Image Optimizer is the new name of Imagepress. Install and activate it, then deactivate and delete Imagepress (while Imagepress is active, Karina Image Optimizer stays idle so images are not optimized twice). Your settings, statistics, per-image results and the redirects of converted images are then moved over automatically. If you defined <code>IMAGEPRESS_API_KEY<\/code> in <code>wp-config.php<\/code>, rename it to <code>KARINA_IO_API_KEY<\/code>. A queue run of existing images that was in progress is not carried over: start it again under <em>Settings \u2192 Karina Image Optimizer<\/em>.<\/p><\/dd>\n<dt id=\"what%20happens%20if%20the%20api%20is%20down%3F\"><h3>What happens if the API is down?<\/h3><\/dt>\n<dd><p>The upload goes through with the original file. The error is shown under <em>Statistics \u2192 Last error<\/em> on the settings screen.<\/p><\/dd>\n<dt id=\"can%20i%20optimize%20images%20i%20uploaded%20before%20installing%20karina%20image%20optimizer%3F\"><h3>Can I optimize images I uploaded before installing Karina Image Optimizer?<\/h3><\/dt>\n<dd><p>Yes. Go to <em>Settings \u2192 Karina Image Optimizer \u2192 Existing images<\/em>, choose <strong>Only featured images<\/strong> (of posts and\/or products \u2014 the safest choice, especially when converting to WebP) or <strong>All images in the Media Library<\/strong>, and start, or select images in <em>Media \u2192 Library<\/em> (list view) and choose <strong>Optimize with Karina Image Optimizer<\/strong>. They are processed one by one in the background. Errors that come from the service (wrong key, quota, outage) pause the queue rather than marking every image as failed.<\/p>\n\n<ul>\n<li><strong>Keep format:<\/strong> each image keeps its file name and URL. The full-size file is replaced by its optimized version and every thumbnail is regenerated from it.<\/li>\n<li><strong>Convert to WebP:<\/strong> each image is renamed to <code>.webp<\/code> and its old files (including the full-size original) are deleted, so <strong>back up your uploads folder first<\/strong>. Links in post content and excerpts are updated, and requests for an old file URL are redirected (301) to the new file whenever the request reaches WordPress. Links stored elsewhere, such as in page-builder data, rely on that redirect.<\/li>\n<\/ul><\/dd>\n<dt id=\"the%20queue%20is%20slow%20or%20stuck\"><h3>The queue is slow or stuck<\/h3><\/dt>\n<dd><p>The queue runs on WP-Cron, which only fires when your site gets visits. Keep the settings page open to process images continuously, or set up a real server cron job for <code>wp-cron.php<\/code>. If <code>DISABLE_WP_CRON<\/code> is set, a server cron job is required.<\/p><\/dd>\n<dt id=\"why%20are%20some%20uploads%20not%20converted%3F\"><h3>Why are some uploads not converted?<\/h3><\/dt>\n<dd><p>An upload is left unchanged when its format is not enabled, it is larger than 20 MB, or the optimized result is not smaller (when that option is on). When converting to WebP, animated files are skipped, as are all uploads if your server's image editor cannot create WebP thumbnails (the <em>Server check<\/em> panel shows this). When keeping the format, BMP files are skipped because BMP has no compression to optimize.<\/p><\/dd>\n<dt id=\"should%20i%20keep%20the%20format%20or%20convert%20to%20webp%3F\"><h3>Should I keep the format or convert to WebP?<\/h3><\/dt>\n<dd><p>WebP is usually the smallest and every current browser supports it. Keep the original format if your theme, another plugin or an external service expects JPEG\/PNG files, or if you want file names and URLs to stay exactly as uploaded.<\/p><\/dd>\n<dt id=\"is%20image%20metadata%20kept%3F\"><h3>Is image metadata kept?<\/h3><\/dt>\n<dd><p>Usually not. The API strips EXIF\/IPTC data, including camera and GPS information, as part of the optimization, and applies the EXIF orientation first so photos keep the right orientation. When the format is kept and a file is already optimal, it is returned unchanged, metadata included.<\/p><\/dd>\n<dt id=\"uploads%20time%20out%20on%20my%20host\"><h3>Uploads time out on my host<\/h3><\/dt>\n<dd><p>Uploads wait for the API. If PHP's <code>max_execution_time<\/code> is shorter than the plugin's timeout, lower the timeout or ask your host to raise the limit. The <em>Server check<\/em> panel warns you about this.<\/p><\/dd>\n<dt id=\"developer%20hooks\"><h3>Developer hooks<\/h3><\/dt>\n<dd><ul>\n<li><code>karina_io_should_optimize<\/code> (filter) \u2013 <code>( bool $should, array $upload, string $context )<\/code><\/li>\n<li><code>karina_io_max_file_size<\/code> (filter) \u2013 <code>( int $bytes )<\/code><\/li>\n<li><code>karina_io_request_args<\/code> (filter) \u2013 <code>( array $args, string $endpoint )<\/code><\/li>\n<li><code>karina_io_optimized<\/code> (action) \u2013 <code>( array $new_upload, array $original_upload )<\/code><\/li>\n<li><code>karina_io_optimization_failed<\/code> (action) \u2013 <code>( WP_Error $error, array $upload )<\/code><\/li>\n<li><code>karina_io_featured_post_types<\/code> (filter) \u2013 <code>( array $types )<\/code>: post types whose featured images \"Only featured images\" offers (slug =&gt; label).<\/li>\n<li><code>karina_io_queue_time_budget<\/code> (filter) \u2013 <code>( int $seconds )<\/code>: how long one WP-Cron run keeps starting new images (default 20).<\/li>\n<\/ul><\/dd>\n\n<\/dl>\n\n<!--section=changelog-->\n<h4>1.4.0<\/h4>\n\n<ul>\n<li>Renamed from Imagepress to Karina Image Optimizer, for the WordPress.org plugin directory. Settings, statistics and per-image data of Imagepress are moved over automatically (see the FAQ).<\/li>\n<li>The API key field links to <a href=\"https:\/\/karinaco.net\/dashboard\/tokens\">karinaco.net\/dashboard\/tokens<\/a> to get an API key and to <a href=\"https:\/\/karinaco.net\/pricing\">karinaco.net\/pricing<\/a> to buy tokens.<\/li>\n<li>New: when the token balance is used up or the account has no token package, the error says so (in your language), and the settings screen, the paused queue and the connection test link to the pricing page.<\/li>\n<li>Fix: when converting existing images to WebP, the old files are now deleted only after the new thumbnails were built, so a failure can no longer leave broken image links.<\/li>\n<li>Fix: \"Test connection\" no longer sends the saved API key to a different endpoint typed into the form.<\/li>\n<li>Fix: cancelling the queue while an image is being processed no longer leaves that image marked as queued.<\/li>\n<li>Fix: the plugin description on the Plugins screen showed garbled characters.<\/li>\n<li>Translations, including Persian, now come as language packs from translate.wordpress.org instead of the plugin's languages folder.<\/li>\n<\/ul>\n\n<h4>1.3.2<\/h4>\n\n<ul>\n<li>Fix: on hosts that stop PHP after 30 seconds, large images no longer fail with \"Operation timed out\". Karina Image Optimizer now raises the PHP time limit while it waits for the API, so the timeout no longer has to be lowered.<\/li>\n<li>The server check warns when the API timeout is below 60 seconds. It no longer suggests lowering the timeout.<\/li>\n<\/ul>\n\n<h4>1.3.1<\/h4>\n\n<ul>\n<li>Fix: a temporary API error (HTTP 5xx such as 502, or a timeout) no longer pauses the existing-images queue. The image is retried after 30 and then 60 seconds. An image that keeps failing is marked failed and the queue moves on. The queue pauses only when three images in a row fail, and those images are put back first.<\/li>\n<li>New: Persian (fa_IR) translation, loaded from the plugin's languages folder.<\/li>\n<\/ul>\n\n<h4>1.3.0<\/h4>\n\n<ul>\n<li>New: optimize only featured images (posts and\/or WooCommerce products, including variations) \u2014 the new default choice for existing images. Featured images are linked by ID, so themes and WooCommerce follow a WebP conversion automatically.<\/li>\n<\/ul>\n\n<h4>1.2.0<\/h4>\n\n<ul>\n<li>New: optimize existing images with a background queue (WP-Cron plus live progress on the settings page), with pause, resume and cancel.<\/li>\n<li>New: \"Optimize\" row action and \"Optimize with Karina Image Optimizer\" bulk action in the Media Library. The column shows queued, failed and skipped images.<\/li>\n<li>New: when existing images are converted to WebP, links in post content are updated (setting) and old file URLs redirect to the new files.<\/li>\n<li>Deactivating the plugin pauses the queue; uninstalling removes all queue data.<\/li>\n<li>The API key field links to the karinaco.net sign-up page while no key is saved.<\/li>\n<\/ul>\n\n<h4>1.1.0<\/h4>\n\n<ul>\n<li>New: \"Output format\" setting: keep the original format (new default) or convert to WebP.<\/li>\n<li>The Media Library column shows the output format.<\/li>\n<\/ul>\n\n<h4>1.0.0<\/h4>\n\n<ul>\n<li>First release.<\/li>\n<\/ul>","raw_excerpt":"Automatically optimize images on upload via an external API: keep their format or convert them to WebP.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/br.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/414063","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/br.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/br.wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/br.wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=414063"}],"author":[{"embeddable":true,"href":"https:\/\/br.wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/mohsenhasanpour"}],"wp:attachment":[{"href":"https:\/\/br.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=414063"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/br.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=414063"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/br.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=414063"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/br.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=414063"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/br.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=414063"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/br.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=414063"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}