Compress a JPG or PNG image

compresses images to drastically reduce file size while keeping high visual quality, optimizing web performance and storage

Why use an image compression tool?

An image compression tool lets you reduce image file sizes without compromising their quality. This improves website performance by lowering load times and saves storage space. A lighter image file is also easier to share and embed in projects.

How to compress an image

On the compression page, you can compress your images by uploading them directly from your device. Pick the desired image and adjust the compression parameter to your needs.

Once the image is uploaded and the settings adjusted, click the compress button. The compressed image will then be available for download. If an error occurs, a message will indicate the problem.

Using the compressed image

The compressed image is downloaded automatically. This makes it easier to embed the optimised image in your web projects, documents or for quick sharing.

Your compressed image should have a reduced file size while maintaining high visual quality.

Frequently asked questions

Which image formats are compressed?

The tool accepts the common web formats: JPG, JPEG, PNG and WebP. JPEG benefits from efficient lossy compression, ideal for photos. PNG is optimised losslessly, which suits logos and screenshots. For the maximum gain on web visuals, converting to WebP often yields the lightest files at equivalent visual quality.

Is the compression lossy?

It depends on the format. JPG compression is lossy: it removes imperceptible details to reduce weight, and the operation is irreversible. PNG compression is lossless: it reorganises the data without losing information, and the decompressed image is identical pixel by pixel. Choose the format based on the weight/quality trade-off you want.

What is the maximum file size I can upload?

The practical limit is around 10 MB per image. Above that, processing is still possible but transfer and processing times grow noticeably. For very large files (RAW photos exported as TIFF), consider running them through a high-quality JPEG export in your photo software before compressing here.

Is EXIF data preserved?

No. Compression systematically strips EXIF metadata (date, device model, geolocation, ICC profile). This helps reduce the final weight and protects your privacy when you publish the photo on the web. If you need to keep the EXIF, back up the original before compressing.

Is my image kept on your servers?

The image is uploaded for processing, then deleted immediately after compression. No file is kept on disk or shared with a third party. The result is returned as a direct download, with no persistent URL.

Why compress an image before publishing it?

A light image file directly improves perceived performance: faster pages, better Core Web Vitals score, better Google ranking. On mobile and in low-bandwidth areas, the gain is even more pronounced. For a shop or a blog, optimising every image before publication can push the PageSpeed score from 60 to 90 without touching the code.

Example request

curl -X POST https://cdrn.fr/api/v1/tools/compress-image/execute \
  -F "image=@/path/to/file" \
  -F "quality=80"

Input schema

Field Type Required Default
image file
quality integer 80

this tool expects a file - use Content-Type multipart/form-data instead of application/json

Endpoints

  • GET https://cdrn.fr/api/v1/tools - lists every available tool
  • GET https://cdrn.fr/api/v1/tools/compress-image - returns the schema for this tool
  • POST https://cdrn.fr/api/v1/tools/compress-image/execute - runs this tool with a JSON payload