{"inline_daily":{"image-compressor-resizer":{"after":"After","after_alt":"Compressed image: {{name}}","allow_shrink":"Reduce dimensions if the lowest quality is not enough","before":"Before","before_alt":"Original image: {{name}}","capped_note":"Dimensions capped by the tool at {{side}} px per side and {{mp}} megapixels.","choose_files":"Choose images","clear_all":"Remove all","compress_all":"Compress images","dims":"{{w}} × {{h}} px","download":"Download","download_all":"Download all","download_all_hint":"Your browser may ask permission to download several files.","download_aria":"Download {{name}}","drop_hint":"JPEG, PNG, WebP, GIF, BMP or AVIF, up to {{max}} per file. HEIC is not supported.","drop_title":"Drop your images here","empty":"No images yet: results will appear here, with the size before and after.","err_decode":"Unreadable or damaged image, or too large for the browser.","err_heic":"HEIC is not supported: convert the photo to JPEG first.","err_memory":"Not enough memory for this image: reduce its dimensions or close other tabs, then try again.","err_too_large":"File too large: {{max}} maximum.","err_unsupported":"This file is not a supported image.","format_auto":"Same as original","format_fallback":"Your browser cannot produce this format: the file was saved as PNG.","format_jpeg":"JPEG","format_png":"PNG","format_webp":"WebP","format_label":"Output format","heavier":"{{pct}} larger","heavier_note":"Larger than the original: lower the quality, reduce the dimensions or change the format.","height_label":"Height","kb_note":"1 KB = 1,000 bytes: a limit met here is also met on a site that counts 1,024 bytes per KB.","keep_ratio":"Keep aspect ratio","metadata_note":"Re-encoding starts from the pixels: EXIF metadata (GPS location, camera, date) is not copied.","mode_label":"Compression","mode_quality":"Fixed quality","mode_target":"Maximum size","not_reached":"Size not reached even at the lowest quality: reduce the dimensions.","percent_label":"Percentage","png_not_reached":"PNG has no quality setting: size not reached. Reduce the dimensions or switch to WebP or JPEG.","png_note":"PNG is lossless: quality does not apply. For a smaller file, reduce the dimensions or choose WebP or JPEG.","preview_aria":"Preview {{name}}","preview_hint":"Preview scaled to fit the screen: download the file to see it at full size.","preview_title":"Before and after preview","privacy":"Your images stay in your browser: nothing is uploaded to a server.","px_hint_exact":"The image takes exactly these dimensions and may be distorted. 0 keeps the original side.","px_hint_ratio":"The image fits inside this box, without distortion or enlargement. 0 leaves a side free.","quality_label":"Quality","quality_used":"quality {{q}}","remove_aria":"Remove {{name}}","resize_label":"Dimensions","resize_none":"Unchanged","resize_percent":"By percentage","resize_px":"In pixels","results_title":"Results","saving":"{{pct}} smaller","settings_changed":"Settings changed: click \"Compress images\" to apply them.","settings_title":"Settings","shrunk_note":"Dimensions reduced to fit under the requested size.","sizes":"{{before}} → {{after}}","status_done":"Images processed: {{done}} of {{total}}","status_waiting":"Waiting","status_working":"Compressing…","target_label":"Maximum size per image","total_line":"Total: {{before}} → {{after}}","unit_kb":"KB","width_label":"Width"}},"docs_daily":{"tools":{"image-compressor-resizer":{"content":{"title":"How to compress an image under a target size","intro":"To make an image lighter, the tool re-encodes it as JPEG or WebP at a lower quality and can shrink its dimensions: halving the width and height divides the pixel count by four. In \"Maximum size\" mode it finds the highest quality that fits under the limit, such as 200 KB. Everything runs in your browser and no image is uploaded.","details":"
Each image is decoded in the browser with the orientation stored in the photo, redrawn on a canvas at the chosen size, then re-encoded with canvas.toBlob. In \"Maximum size\" mode, quality is found by binary search between 5 and 95: the tool tries 95, then 5, then halves the interval seven times and keeps the highest quality that fits. Seven halvings bring the gap down to 0.9 ÷ 27 ≈ 0.007, less than one quality point, in at most 9 encodes. If quality 5 is still too large, both sides are multiplied by √(target ÷ size) × 0.9 and the search starts again, up to four times.
A 4,000 × 3,000 px photo must stay under 200 KB. In a 1,920 × 1,080 px box with the aspect ratio kept, the factor is min(1,920 ÷ 4,000; 1,080 ÷ 3,000) = 0.36, so the image comes out at 1,440 × 1,080 px: 1,555,200 pixels instead of 12,000,000 (13%). At 50% it would be 2,000 × 1,500 px. The tool counts 1 KB = 1,000 bytes, so 200 KB is 200,000 bytes or 195.3 KiB, and the limit also holds for a site that counts 1,024 bytes per KB.
Sources and dates: HTML Standard (WHATWG), serializing bitmaps to a file; HTML Standard (WHATWG), createImageBitmap and imageOrientation; PNG Specification, Third Edition (W3C) (checked on 28/11/2026).
"},"faqs":[{"question":"How do I get a photo under 200 KB?","answer":"Pick \"Maximum size\", enter 200 KB and choose JPEG or WebP. The tool finds the highest quality that fits under 200,000 bytes in at most 9 encodes and, if quality 5 is not enough, shrinks the dimensions. Scaling a 4,000 px wide photo down to 1,920 px first divides its pixels by 4.3, which leaves room for a higher quality at the same size."},{"question":"Why doesn't my PNG get smaller?","answer":"PNG is lossless, so the quality setting does not apply, and re-encoding a PNG can even produce a larger file. Reduce its dimensions (at 50% it keeps a quarter of its pixels) or convert it to WebP or JPEG. JPEG replaces transparency with white."},{"question":"How do I resize an image without distorting it?","answer":"Tick \"Keep aspect ratio\": the width and height you enter become a box the image fits inside. A 4,000 × 3,000 px photo in a 1,920 × 1,080 px box comes out at 1,440 × 1,080 px, because the smaller of the two factors (0.36) is used. Untick it to force exact dimensions."},{"question":"Does compressing remove EXIF data and GPS location?","answer":"Yes. The image is redrawn and re-encoded from its pixels only, so the EXIF metadata of the original file (GPS location, camera model, date) is not copied. The photo orientation is applied first, so the image stays the right way up."}]}}}}