{"id":698,"date":"2024-05-07T11:41:45","date_gmt":"2024-05-07T11:41:45","guid":{"rendered":"https:\/\/kb.shortpixel.com\/docs\/what-is-smart-cropping\/"},"modified":"2025-08-27T08:46:51","modified_gmt":"2025-08-27T08:46:51","password":"","slug":"what-is-smart-cropping","status":"publish","type":"docs","link":"https:\/\/kb.shortpixel.com\/knowledge-base\/article\/what-is-smart-cropping\/","title":{"rendered":"What is Smart cropping?"},"content":{"rendered":"\n<p>Both <a href=\"https:\/\/wordpress.org\/plugins\/shortpixel-image-optimiser\/\" rel=\"noopener\">ShortPixel Image Optimizer<\/a> (<strong>SPIO<\/strong>)&nbsp;and <a href=\"https:\/\/wordpress.org\/plugins\/shortpixel-adaptive-images\/\" rel=\"noopener\">ShortPixel Adaptive Images<\/a> (<strong>SPAI<\/strong>) can smart crop your images easily.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">What is smart cropping and why is it helpful?<\/h2>\n\n\n\n<p>Regular cropping doesn&#8217;t take into consideration the elements in a picture. Let&#8217;s take this picture, for example:<\/p>\n\n\n\n<p><img decoding=\"async\" src=\"https:\/\/kb.shortpixel.com\/wp-content\/uploads\/2025\/08\/file-5DDjKtQTlF.jpg\"><\/p>\n\n\n\n<p>When cropped regularly to 500&#215;320 pixels, it will look like this:<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/kb.shortpixel.com\/wp-content\/uploads\/2025\/08\/file-N8oAmVuCbj.jpg\" alt=\"\"\/><\/figure>\n\n\n\n<p>On the other hand, when smart cropped, it will look like this:<\/p>\n\n\n\n<p><img decoding=\"async\" src=\"https:\/\/kb.shortpixel.com\/wp-content\/uploads\/2025\/08\/file-v75Dl9WZk1.jpg\"><\/p>\n\n\n\n<p>As you can see, the framing on the smart-cropped thumbnail is much better!<\/p>\n\n\n\n<p><em>Photo by Azamat Zhanisov on<\/em> <a href=\"https:\/\/unsplash.com\/?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText\" rel=\"noopener\"><em>Unsplash<\/em><\/a><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">How does smart cropping work in ShortPixel&#8217;s plugins?<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">SPIO<\/h3>\n\n\n\n<p>In ShortPixel Image Optimizer, smart cropping works for both the original image and <a href=\"https:\/\/shortpixel.com\/knowledge-base\/article\/this-plugin-is-creating-new-thumbnails-how-can-i-stop-it\/\" rel=\"noopener\">thumbnails<\/a>. Each time an image is sent for optimization, the thumbnails keep the original size but display the &#8220;right&#8221; part of the image, as described above.<\/p>\n\n\n\n<p>Smart Cropping also has a nice additional feature:&nbsp;the cropped thumbnails become sharper. This sometimes makes the Smart Cropping thumbnails a bit larger, but the result is amazing. Here is an example. This is an original thumbnail:<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/kb.shortpixel.com\/wp-content\/uploads\/2025\/08\/file-SkKhPsF06p.jpg\" alt=\"\"\/><\/figure>\n\n\n\n<p>And this one is sharpened, after going through the Smart Crop algorithm:<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/kb.shortpixel.com\/wp-content\/uploads\/2025\/08\/file-o15eUWtWMT.jpg\" alt=\"\"\/><\/figure>\n\n\n\n<p>The original image is also cropped in the same way, but only if the &#8220;<a href=\"https:\/\/shortpixel.com\/knowledge-base\/article\/can-shortpixel-automatically-resize-new-image-uploads\/\" rel=\"noopener\">Resize large images<\/a>&#8221; option is enabled.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">SPAI<\/h3>\n\n\n\n<p>In ShortPixel Adaptive Images, smart cropping works mainly on background images, i.e. images set with the CSS <code>background-image<\/code>&nbsp;property. This is because normal images in <code>img<\/code> HTML tags display the entire image and therefore do not require (smart) cropping.<\/p>\n\n\n\n<p>However, not all background images are smart cropped.&nbsp;Our API supports smart cropping by simply passing the width and height of the image,&nbsp;but in order for SPAI to send a width and height parameter that triggers smart cropping,&nbsp;the image needs to <strong style=\"background-color: initial;\">not<\/strong> be fully visible on the page,&nbsp;as it would be with the&nbsp;<code>background-size: cover<\/code>&nbsp;property\/value.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Where can I enable smart cropping?<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">SPIO<\/h3>\n\n\n\n<p>You can enable the option by going to your WordPress dashboard and then to Settings &gt; ShortPixel &gt; Image Optimization. Look for the setting &#8220;Enable SmartCrop&#8221;:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"448\" height=\"307\" src=\"https:\/\/kb.shortpixel.com\/wp-content\/uploads\/2024\/05\/Screenshot-20250313_111355.jpg\" alt=\"\" class=\"wp-image-1829\" srcset=\"https:\/\/kb.shortpixel.com\/wp-content\/uploads\/2024\/05\/Screenshot-20250313_111355.jpg 448w, https:\/\/kb.shortpixel.com\/wp-content\/uploads\/2024\/05\/Screenshot-20250313_111355-300x206.jpg 300w, https:\/\/kb.shortpixel.com\/wp-content\/uploads\/2024\/05\/Screenshot-20250313_111355-360x247.jpg 360w\" sizes=\"(max-width: 448px) 100vw, 448px\" \/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">SPAI<\/h3>\n\n\n\n<p>You can enable the option by following the steps below:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>On your WordPress dashboard, go to Settings &gt; ShortPixel AI.<\/li>\n\n\n\n<li>Enable the Advanced mode<br><figure><img decoding=\"async\" src=\"https:\/\/kb.shortpixel.com\/wp-content\/uploads\/2025\/08\/file-ktXs32V0YE.jpg\"><\/figure><\/li>\n\n\n\n<li><p>Go to the Behavior tab.<\/p><\/li>\n\n\n\n<li><p>Enable &#8220;Smart crop&#8221;: <img decoding=\"async\" src=\"https:\/\/kb.shortpixel.com\/wp-content\/uploads\/2025\/08\/file-Gm8SxshDhu.jpg\"><\/p><\/li>\n<\/ol>\n","protected":false},"excerpt":{"rendered":"<p>Both ShortPixel Image Optimizer (SPIO)&nbsp;and ShortPixel Adaptive Images (SPAI) can smart crop your images easily. What is smart cropping and why is it helpful? Regular cropping doesn&#8217;t take into consideration the elements in a picture. Let&#8217;s take this picture, for example: When cropped regularly to 500&#215;320 pixels, it will look like this: On the other [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","template":"","meta":{"footnotes":""},"doc_category":[35,37],"glossaries":[],"doc_tag":[],"class_list":["post-698","docs","type-docs","status-publish","hentry","doc_category-shortpixel-adaptive-images","doc_category-shortpixel-image-optimizer"],"blocksy_meta":[],"year_month":"2026-04","word_count":377,"total_views":"2696","reactions":{"happy":"0","normal":"0","sad":"0"},"author_info":{"name":"admin","author_nicename":"admin_mdli53m5","author_url":"https:\/\/kb.shortpixel.com\/author\/admin_mdli53m5\/"},"doc_category_info":[{"term_name":"ShortPixel Adaptive Images","term_url":"https:\/\/kb.shortpixel.com\/knowledge-base\/category\/shortpixel-adaptive-images\/"},{"term_name":"ShortPixel Image Optimizer","term_url":"https:\/\/kb.shortpixel.com\/knowledge-base\/category\/shortpixel-image-optimizer\/"}],"doc_tag_info":[],"knowledge_base_info":[],"knowledge_base_slug":[],"_links":{"self":[{"href":"https:\/\/kb.shortpixel.com\/wp-json\/wp\/v2\/docs\/698","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/kb.shortpixel.com\/wp-json\/wp\/v2\/docs"}],"about":[{"href":"https:\/\/kb.shortpixel.com\/wp-json\/wp\/v2\/types\/docs"}],"author":[{"embeddable":true,"href":"https:\/\/kb.shortpixel.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/kb.shortpixel.com\/wp-json\/wp\/v2\/comments?post=698"}],"version-history":[{"count":4,"href":"https:\/\/kb.shortpixel.com\/wp-json\/wp\/v2\/docs\/698\/revisions"}],"predecessor-version":[{"id":2147,"href":"https:\/\/kb.shortpixel.com\/wp-json\/wp\/v2\/docs\/698\/revisions\/2147"}],"wp:attachment":[{"href":"https:\/\/kb.shortpixel.com\/wp-json\/wp\/v2\/media?parent=698"}],"wp:term":[{"taxonomy":"doc_category","embeddable":true,"href":"https:\/\/kb.shortpixel.com\/wp-json\/wp\/v2\/doc_category?post=698"},{"taxonomy":"glossaries","embeddable":true,"href":"https:\/\/kb.shortpixel.com\/wp-json\/wp\/v2\/glossaries?post=698"},{"taxonomy":"doc_tag","embeddable":true,"href":"https:\/\/kb.shortpixel.com\/wp-json\/wp\/v2\/doc_tag?post=698"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}