
How to Replace, Compress and Edit Images in a PDF Online
Need to swap a logo, shrink an oversized photo, or remove an image from a PDF? Here's exactly how to do it without Adobe Acrobat.
PDF images cause two overlapping problems: they inflate file size to the point where email attachments bounce (Gmail cuts off at 25 MB, Outlook at 20 MB), and they are nearly impossible to edit without a paid desktop app. Adobe Acrobat Pro's subscription cost drives massive demand for free alternatives — and that demand is justified. This guide covers every image operation you are likely to need: replacing, removing, resizing, compressing, and inserting images, along with format tips and what to do when a replacement breaks your layout.
What Image Operations Do People Actually Need in a PDF?
Most PDF image editing falls into one of four categories:
Replace image — swap a logo, photo, or diagram for an updated version without rebuilding the whole document. This is the most common request: a company rebrand, an updated product photo, or a corrected chart.
Remove image — erase a watermark, a placeholder graphic, or a decorative image that clutters a form. Sometimes you just need a blank region.
Resize image — scale an image up or down within its frame. This often comes up when a replacement photo has different dimensions from the original.
Compress image — reduce the resolution or quality of embedded photos to shrink the overall PDF. File-too-large-to-email is the second most cited PDF pain point (88% frustration index in user surveys), and images are almost always the culprit.
A fifth, less frequent task is inserting a new image — adding a logo, rubber-stamp graphic, signature image, or diagram to a page that did not originally have one.
All five can be done online without installing anything.
How to Replace an Image in a PDF Online
Replacing an image inside a PDF without disturbing surrounding text and layout is the operation that trips most people up. PDF layout is absolute-positioned: everything sits at a fixed coordinate, so if you simply delete an image and paste a new one, the new image lands wherever the editor places it by default, not where the old one was.
A proper image-replace workflow works like this:
- Open your PDF in a free online PDF editor.
- Click the image you want to replace. The editor selects it and shows its bounding box.
- Use the "Replace Image" option to upload your new file. The editor drops the new image into the same bounding box as the original.
- If the new image has a different aspect ratio, you may see slight distortion — resize handles let you adjust within the frame.
- Download the edited PDF.
The key feature to look for is layout preservation: the editor should keep surrounding text, borders, and other images exactly where they were. OnlinePDFEdits handles this by reading the original image's position and dimensions from the PDF structure before inserting the replacement, so the rest of the page does not reflow.
One practical note: if your replacement image is significantly larger in file size than the original (a high-resolution photo replacing a thumbnail, for example), the output PDF will be larger. Run it through /compress-pdf afterward if size matters.
Why PDF Images Get Large — and How to Compress Them
A single uncompressed photograph can push a PDF past the practical email attachment ceiling before you have added a second page. Here is what drives PDF image size:
Original image resolution is too high. Print-ready PDFs often embed images at 300 DPI or higher. For a document that will only ever be read on screen, 96–150 DPI is indistinguishable from 300 DPI and can be one-fifth the file size.
PNG used where JPEG would do. PNG is lossless, which makes it ideal for logos, diagrams, and screenshots with sharp edges and flat colors. It is a poor choice for photographs, where JPEG at 80% quality produces files 5–10× smaller with no visible degradation at normal viewing distances.
Multiple images, no compression applied. A 20-page brochure with one photo per page, each at 300 DPI, can easily exceed 50 MB. Downsampling each image to 150 DPI typically gets that under 10 MB.
When you compress a PDF on onlinepdfedits.com/compress-pdf, the tool downsamples embedded images and re-encodes them at a lower quality setting. For most documents, the visual difference is undetectable and the size reduction is 40–70%.
If you only need to compress one specific image rather than the whole document, replace it with a pre-compressed version of the same image before exporting. Export the image from the PDF, run it through an image compressor, and use the replace-image flow above.
Removing an Image from a PDF
Removing an image leaves a blank space where the image was. Depending on the PDF, that blank space may be white, may expose the page background color, or may reveal whatever was underneath (some PDFs layer content).
The straightforward approach: select the image in the editor and delete it. The region becomes empty. If the page background is white and you want a clean white rectangle in place of the image, this is sufficient.
For more control — for example, erasing a watermark that overlaps text — use an erase/redact region tool rather than a delete. This paints an opaque rectangle over the target area rather than trying to remove a discrete image object. This approach works even when the "image" is not a discrete object in the PDF's structure (some watermarks are baked into the page content stream and do not appear as selectable image objects).
When removing decorative images that sit alongside text columns, check that the text reflow does not break after deletion. In most PDFs, text is absolute-positioned and will not move when you remove a neighboring image, so you get a gap. That gap is usually fine for internal documents; for a client-facing document you may want to expand a text box to fill it.
Adding a New Image to a PDF
Inserting a new image — a logo on a blank header, a stamp or watermark, a diagram in an empty section — is straightforward in a modern PDF editor:
- Open the PDF.
- Use the Insert Image or Add Image button and upload your file (JPEG, PNG, or WebP all work).
- Drag the image to the desired position on the page.
- Resize using corner handles to fit the intended space.
- Use alignment guides to snap to margins or other elements if the editor provides them.
Logo insertion tips: Use a PNG with a transparent background so the logo sits cleanly over any page color without a white box around it. JPEG does not support transparency.
Stamp / overlay tips: If you are adding a "Confidential" or "Draft" stamp, position it diagonally across the page center and reduce opacity so underlying text remains readable. Some editors let you set image opacity directly; in others, pre-apply the opacity in an image editor before uploading.
Diagram insertion: If you are inserting a technical diagram that needs to stay crisp at any zoom level, export it as a high-resolution PNG (at least 150 DPI at the intended display size) rather than a JPEG.
For adding multiple images across a multi-page document, the merge-pdf tool can be useful — prepare a page with the image layout you want, then merge it with your main document.
JPEG vs PNG in PDFs: Which Format to Use
Choosing the wrong image format is the most common cause of unnecessarily large PDFs. The rule is simple:
| Content type | Best format | Why |
|---|---|---|
| Photograph, product image, background | JPEG | Lossy compression; file size 5–10× smaller than PNG for photos |
| Logo, icon, diagram, chart | PNG | Lossless; preserves sharp edges and flat colors; supports transparency |
| Screenshot of UI with text | PNG | Text edges stay crisp; JPEG introduces artifacts around high-contrast edges |
| Signature image | PNG (transparent) | No white background box over the page |
A common mistake is exporting a logo from Illustrator as JPEG "because it's smaller." JPEG does not support transparency, so you get a white rectangle behind the logo, and the compression artifacts make the edges look fuzzy. Use PNG for logos, always.
Conversely, embedding a 4 MB PNG photograph into a PDF when a 400 KB JPEG would look identical is the most frequent reason someone hits the 88% pain point of files too large to email.
When Image Replacement Breaks Layout
The most frequent layout breakage after replacing an image: the new image is physically larger than the original, and the editor scales it to fit the bounding box, distorting its aspect ratio. You end up with a squashed or stretched image.
Fix before inserting: Crop and resize the replacement image to match the original's pixel dimensions before uploading it. Most operating systems have a built-in image resize tool (Windows Photos, macOS Preview). Check the original image dimensions first — many PDF editors display width and height in the properties panel when you click an image.
Fix after inserting: Use the editor's resize handles while holding the aspect-ratio lock (usually Shift + drag on a corner handle). Resize to match the original frame, accept that some cropping may occur, then reposition.
When the replacement is a different shape entirely (replacing a landscape photo with a portrait one, for example), you will need to restructure the surrounding layout. In that case, it is often faster to remove the image, move surrounding text elements to make room, and then insert the new image in the cleared space.
If the overall document layout is breaking, check whether you are working on a re-exported PDF — documents that have been edited and re-saved sometimes carry stale embedded layout data that causes unexpected behavior. Working from the original source PDF whenever possible avoids this class of problem.
FAQ
Can I replace an image in a PDF without losing the surrounding text?
Yes, as long as you use an editor that reads the image's original position before inserting the replacement. OnlinePDFEdits places the new image into the same bounding box as the old one, so surrounding text and other page elements stay in place. If text shifts after replacement, the PDF likely uses a layout where text and images are linked — work from the original source file if available.
Why is my PDF so large even though I only have a few images?
High-resolution embedded images are almost always the cause. A single 300 DPI photograph on an A4 page can be 3–5 MB uncompressed. If your PDF has several of these, file size adds up quickly. Use the compress-pdf tool to downsample images to screen resolution. For most documents, 96–150 DPI is visually identical to 300 DPI on screen and 40–70% smaller.
What is the difference between deleting an image and erasing a region?
Deleting removes the image object from the PDF structure, leaving whatever is underneath (usually blank page background). Erasing a region paints an opaque overlay (typically white) over a specific area, which works even when the content is not a discrete selectable object — useful for baked-in watermarks or background graphics. Use delete for clean image objects; use erase for anything embedded in the page content stream.
Do I need to install software to edit PDF images online?
No. Browser-based tools handle image replacement, removal, insertion, and compression without any download or installation. OnlinePDFEdits runs entirely in the browser — upload your PDF, make the image changes, and download the result. The only practical limit is file size: very large PDFs (above 50 MB) may be slower to process online, in which case compressing the file first speeds things up.


