Replace Image in PDF
Swap embedded images, keeping position and size
Files are processed only in this browser. Nothing is uploaded to a server.
Swap an embedded image while keeping its position and size on the page
This PDF is password-protected.
Continue in another tool
Processing…
Everything runs inside this browser. Your file is never sent to a server.
Your file is ready to download
Continue with this result
Open page preview
Changing a setting hides the previous result. Run it again to save the latest settings.
Remove the password from an encrypted PDF first. Processing focuses on page content, so bookmarks, attachments, forms and signatures may not be preserved. Keep the original and check the result.
Working…
0.0
It hasn't frozen — the result will appear when the calculation finishes.
About Replace Image in PDF
A PDF page calls an image with an instruction along the lines of “draw object 7 here, at this size”. This tool leaves that instruction alone and swaps what object 7 contains. Text, tables and layout do not move by a single point, and every page that uses the same logo — 30 of them, say — changes at once.
The flip side is that the box the picture sits in is fixed by the page, and the tool cannot move or resize it. How a picture with a different shape is fitted into that box is most of what you get to choose.
When the proportions differ: stretch, contain, cover
Stretch pushes the whole new picture into the box, so a different aspect ratio gets squashed. A JPEG or PNG inserted with stretch keeps its image data, with no recompression. The JPEG’s metadata segments — EXIF (including GPS location), XMP and comments — are cut out first, and a phone photo carrying a rotation flag is redrawn upright. Contain pads one axis until the picture matches the box ratio — white padding for JPEG, transparent for PNG. Cover crops the overflow from the centre. Those two modes, and uploads in other formats such as WebP, are redrawn in the browser and saved as JPEG (quality 0.92) or PNG.
Replacing everywhere vs. on selected pages
The default replaces the object itself, so the old picture's data and its original transparency mask are gone from the output file. If you choose pages instead, the new picture is added as a separate object and only those pages are pointed at it; the old picture stays in the file because other pages still use it. If the goal is to get rid of an old photo, replace everywhere.
Pictures inside a Form XObject shared by several pages — a common way to build headers — are not touched in page mode, because changing them would leak to the other pages.
The How PDF Files Work guide explains objects and references in more depth; this is the practical consequence of that design.
Worked examples
Putting a square logo where a wide one was
- Input
Old logo 400×100 (4:1), new PNG 500×500, contain- Output
The new picture becomes 2000×500 with transparent padding left and right, then fills the box
Keeping the height at 500, a 4:1 ratio needs a width of 2,000. The logo shows at its true proportions in the middle of the box. With cover instead, it is cropped to 500×125 around the centre and loses its top and bottom.
How to use it
- Open the PDF and pick the image card to replace (the pages list shows where it is used).
- Upload the new image and choose stretch, contain or cover and the page scope.
- Build the PDF, check the replaced pages in the preview, and save.
Frequently asked questions
My phone photo came out sideways.
The rotation the phone recorded in the EXIF data is applied: a JPEG with a rotation flag is redrawn upright in the browser (JPEG quality 0.92) even with stretch. If the upright photo now looks squashed, the original box has the other orientation, so use contain or cover.
Can it replace a vector logo or text?
No. Only image objects appear in the list. A logo drawn with paths is not an image and cannot be swapped this way.
Is the original photo still inside the file?
Not after an everywhere replacement. After a page-only replacement it is, because other pages still use it.
How many pixels should the new image have?
Work it out from the box's size on the page. For a 50 mm-wide box printed at 300 dpi you need 50 ÷ 25.4 × 300 ≈ 590 pixels. Much larger files only add weight without visible gain.
I inserted a transparent PNG and the pattern behind it shows through.
If the original was an opaque JPEG, it was hiding whatever is drawn beneath it. A transparent PNG reveals that. Use a PNG with a filled white background, or a JPEG.
Last reviewed: