{"id":2832,"date":"2026-01-22T09:35:48","date_gmt":"2026-01-22T09:35:48","guid":{"rendered":"https:\/\/kb.shortpixel.com\/?post_type=docs&#038;p=2832"},"modified":"2026-01-22T09:56:51","modified_gmt":"2026-01-22T09:56:51","password":"","slug":"why-png-images-with-transparency-get-a-white-background-when-converted-to-jpeg","status":"publish","type":"docs","link":"https:\/\/kb.shortpixel.com\/knowledge-base\/article\/why-png-images-with-transparency-get-a-white-background-when-converted-to-jpeg\/","title":{"rendered":"Why PNG images with transparency get a white background when converted to JPEG?"},"content":{"rendered":"\n<p>When <a href=\"https:\/\/shortpixel.com\/knowledge-base\/article\/settings-convert-png-images-to-jpeg\/\" data-type=\"link\" data-id=\"https:\/\/shortpixel.com\/knowledge-base\/article\/settings-convert-png-images-to-jpeg\/\" rel=\"noopener\">converting PNG images with transparency to JPEG<\/a>, by enabling the <strong>Force conversion of transparent images <\/strong>setting, <strong>transparent areas are replaced with a solid white background color<\/strong>.<\/p>\n\n\n\n<p>PNG images can contain transparent pixels, which makes them ideal for logos, icons, and images that need to blend into different backgrounds. JPEG images, however, do not support transparency at all.<\/p>\n\n\n\n<p>By default, ShortPixel fills transparent areas with white during the conversion process. This ensures predictable and clean results in most common use cases.<\/p>\n\n\n\n<p>Once a PNG is converted to JPEG, transparency is lost. You can <a href=\"https:\/\/shortpixel.com\/knowledge-base\/article\/can-i-restore-my-images-what-happens-with-the-originals\/\" data-type=\"link\" data-id=\"https:\/\/shortpixel.com\/knowledge-base\/article\/can-i-restore-my-images-what-happens-with-the-originals\/\" rel=\"noopener\">restore the original<\/a> backed-up PNG to restore transparency.<\/p>\n\n\n\n<p><strong>Note: <\/strong>If the resulting JPEG image is later placed on a non-white background, the white areas may look unnatural around edges or cutouts. This is a limitation of the JPEG format itself and cannot be fully avoided.<\/p>\n\n\n\n<div class=\"wp-block-columns has-background is-layout-flex wp-container-core-columns-is-layout-a54e0cfc wp-block-columns-is-layout-flex\" style=\"background-color:#f3f3f3;padding-top:var(--wp--preset--spacing--60);padding-bottom:var(--wp--preset--spacing--60)\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<figure class=\"wp-block-image aligncenter size-full\"><img decoding=\"async\" width=\"350\" height=\"350\" src=\"https:\/\/kb.shortpixel.com\/wp-content\/uploads\/2026\/01\/dog-transparent-bg.png\" alt=\"\" class=\"wp-image-2839\" srcset=\"https:\/\/kb.shortpixel.com\/wp-content\/uploads\/2026\/01\/dog-transparent-bg.png 350w, https:\/\/kb.shortpixel.com\/wp-content\/uploads\/2026\/01\/dog-transparent-bg-300x300.png 300w, https:\/\/kb.shortpixel.com\/wp-content\/uploads\/2026\/01\/dog-transparent-bg-150x150.png 150w\" sizes=\"(max-width: 350px) 100vw, 350px\" \/><figcaption class=\"wp-element-caption\">Transparent PNG<\/figcaption><\/figure>\n<\/div>\n\n\n\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<figure class=\"wp-block-image aligncenter size-full\"><img decoding=\"async\" width=\"350\" height=\"350\" src=\"https:\/\/kb.shortpixel.com\/wp-content\/uploads\/2026\/01\/dog-nontransparent-bg.jpg\" alt=\"\" class=\"wp-image-2841\" srcset=\"https:\/\/kb.shortpixel.com\/wp-content\/uploads\/2026\/01\/dog-nontransparent-bg.jpg 350w, https:\/\/kb.shortpixel.com\/wp-content\/uploads\/2026\/01\/dog-nontransparent-bg-300x300.jpg 300w, https:\/\/kb.shortpixel.com\/wp-content\/uploads\/2026\/01\/dog-nontransparent-bg-150x150.jpg 150w\" sizes=\"(max-width: 350px) 100vw, 350px\" \/><figcaption class=\"wp-element-caption\">Converted non-transparent JPG<\/figcaption><\/figure>\n<\/div>\n<\/div>\n\n\n\n<h3 class=\"wp-block-heading\">When to convert PNG to JPEG<\/h3>\n\n\n\n<p>Converting PNGs to JPEG works best when:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>The image does not rely heavily on transparency<\/li>\n\n\n\n<li>The image will be displayed on a white background<\/li>\n\n\n\n<li>File size reduction is a higher priority than preserving transparency<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">When to keep PNG format<\/h3>\n\n\n\n<p>You should keep images as PNG if:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>The image needs real transparency<\/li>\n\n\n\n<li>It will be placed on varying or dark backgrounds<\/li>\n\n\n\n<li>It is a logo, icon, or UI element<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">Related settings<\/h3>\n\n\n\n<p>To enable PNG to JPEG conversion:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Enable <strong><a href=\"https:\/\/shortpixel.com\/knowledge-base\/article\/settings-convert-png-images-to-jpeg\/\" data-type=\"link\" data-id=\"https:\/\/shortpixel.com\/knowledge-base\/article\/settings-convert-png-images-to-jpeg\/\" rel=\"noopener\">Convert PNG images to JPEG<\/a><\/strong><\/li>\n\n\n\n<li>Enable <strong>Force conversion of transparent images<\/strong><\/li>\n\n\n\n<li>Make sure <strong><a href=\"https:\/\/shortpixel.com\/knowledge-base\/article\/settings-optimize-media-on-upload\/\" data-type=\"link\" data-id=\"https:\/\/kb.shortpixel.com\/knowledge-base\/article\/settings-optimize-media-on-upload\/\" rel=\"noopener\">Optimize media on upload<\/a><\/strong> is enabled so conversion happens automatically<\/li>\n<\/ul>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>When converting PNG images with transparency to JPEG, by enabling the Force conversion of transparent images setting, transparent areas are replaced with a solid white background color. PNG images can contain transparent pixels, which makes them ideal for logos, icons, and images that need to blend into different backgrounds. JPEG images, however, do not support [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"closed","template":"","meta":{"footnotes":""},"doc_category":[37,59],"glossaries":[],"doc_tag":[],"class_list":["post-2832","docs","type-docs","status-publish","hentry","doc_category-shortpixel-image-optimizer","doc_category-wordpress-plugins"],"blocksy_meta":[],"year_month":"2026-05","word_count":249,"total_views":"76","reactions":{"happy":"0","normal":"0","sad":"0"},"author_info":{"name":"Andrei Alba","author_nicename":"andrei-alba","author_url":"https:\/\/kb.shortpixel.com\/author\/andrei-alba\/"},"doc_category_info":[{"term_name":"ShortPixel Image Optimizer","term_url":"https:\/\/kb.shortpixel.com\/knowledge-base\/category\/shortpixel-image-optimizer\/"},{"term_name":"WordPress Plugins","term_url":"https:\/\/kb.shortpixel.com\/knowledge-base\/category\/wordpress-plugins\/"}],"doc_tag_info":[],"knowledge_base_info":[],"knowledge_base_slug":[],"_links":{"self":[{"href":"https:\/\/kb.shortpixel.com\/wp-json\/wp\/v2\/docs\/2832","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\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/kb.shortpixel.com\/wp-json\/wp\/v2\/comments?post=2832"}],"version-history":[{"count":16,"href":"https:\/\/kb.shortpixel.com\/wp-json\/wp\/v2\/docs\/2832\/revisions"}],"predecessor-version":[{"id":2856,"href":"https:\/\/kb.shortpixel.com\/wp-json\/wp\/v2\/docs\/2832\/revisions\/2856"}],"wp:attachment":[{"href":"https:\/\/kb.shortpixel.com\/wp-json\/wp\/v2\/media?parent=2832"}],"wp:term":[{"taxonomy":"doc_category","embeddable":true,"href":"https:\/\/kb.shortpixel.com\/wp-json\/wp\/v2\/doc_category?post=2832"},{"taxonomy":"glossaries","embeddable":true,"href":"https:\/\/kb.shortpixel.com\/wp-json\/wp\/v2\/glossaries?post=2832"},{"taxonomy":"doc_tag","embeddable":true,"href":"https:\/\/kb.shortpixel.com\/wp-json\/wp\/v2\/doc_tag?post=2832"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}