How to Compress an Image Online Without Changing Its DPI
Practical steps to reduce image file size in a browser while keeping DPI, pixel dimensions, and aspect ratio the same.
Before you start
Check the image's current DPI and pixel dimensions before choosing a tool. DPI is often stored as metadata, so an online compressor that rewrites the file may remove or replace it even when it does not resize the image. If you need a specific DPI value to survive the process, use an image that already carries that value and confirm whether the selected service preserves metadata. The compression itself runs through the tool's server in most browser-based services unless the page states that processing happens locally.
Step-by-step instructions
Use an online image compressor that does not ask for a target width or height. The goal is to reduce file size without resampling the image, so avoid any step that asks you to enter new pixel dimensions.
Open the compressor and add the image file. Some services let you drag the file into the page, while others provide a file selection button.
Leave the resize setting at its original value or disabled state. If the tool shows options such as width, height, or percentage scale, do not change them.
Select the compression level only if the tool offers it. Lower quality produces a smaller file, but very aggressive compression can create visible artifacts. Start with the default or a moderate setting.
Choose the output file format carefully. Some tools can convert the image to another format, which can change how colors, transparency, and metadata are handled. Keep the original format when possible unless the current format is unsuitable for your use.
Start the compression and download the result. Rename the downloaded file if the tool uses a generic name such as compressed or optimized.
Check the output
Compare the file size to confirm that the compressed file is smaller. Verification depends on the service, so a smaller download is not proof that DPI was preserved.
Open both the original and the compressed image in an image editor or viewer that can display file properties. Check that the pixel dimensions match the original and that DPI is still present at the expected value. If the tool supports keeping metadata, confirm that setting was enabled before processing.
Look at the image at normal viewing size and at high magnification, especially around text, edges, and smooth areas. Compression that preserves dimensions can still reduce clarity or introduce artifacts, particularly in formats with lossy compression.
Common problems and next steps
If the downloaded image has a different DPI value or no DPI metadata, the service likely stripped or rewrote it. Look for an option named preserve metadata, keep EXIF, or similar, and process the image again with that option enabled. If no such option exists, try a different compressor that documents metadata handling.
If pixel dimensions changed, a resize option was either left enabled or applied automatically. Return to the tool and check for resize, scale, or fit settings, then set them to original or disable them before compressing again.
If aspect ratio changes, the tool may have cropped or stretched the image. This usually comes from entering only one dimension or using a preset aspect ratio. Keep both dimensions untouched and avoid presets that force a square or fixed shape.
For images with transparency, choose a format that supports it, such as PNG, when transparency must be retained. Converting to JPEG or another format without an alpha channel can replace transparent areas with a solid background and may dramatically change how the image looks.
If the compressed file is still too large, use a stronger compression setting, convert to a more efficient format if appropriate for the image, or remove unnecessary metadata. Removing metadata reduces file size, but it can also remove the DPI value, so verify the result again before using the image.
Do not send private or sensitive images to an unknown online service unless you have confirmed how the service handles the uploaded file. Privacy and deletion practices vary, and an uploaded image may be stored even when the page offers immediate processing.