I placed in Illustrator file a raster image (image with sharp edges as a layer from PSD) and save it as SVG. When I open it in Chrome or Firefox the image looks compressed with anti-aliased edges. In Preference->General->Anti-aliased Artwork is unchecked. How to turn-off Anti-Aliasing in Illustrator?

If I open SVG as XML I can't find option shape-rendering or image-rendering to fix it.

My SVG file looks like:

<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 19.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0)  -->
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
 viewBox="0 0 1920 1800" style="enable-background:new 0 0 1920 1800;" xml:space="preserve">
    <g id="Layer_1">
        <image style="overflow:visible;" width="308"
height="513" id="XMLID_1068_" xlink:href="data:image/jpeg     
base64,/9j/4AAQSkZJRgAB...(base64 symbols) 
transform="matrix(3.2532 0 0 3.2532 347 79.0844)">
  • Welcome to GD.SE!
    – Mensch
    Dec 9, 2021 at 21:18
  • If it's not there, then just type it in directly like this: <image image-rendering="optimizeSpeed" style= . . . . . ></image>
    – Billy Kerr
    Dec 9, 2021 at 21:47
  • @BillyKerr Thank you! The image has become clearer, but still a little blurry. Apparently it was already saved with the Anti-Aliasing. Make it as answer, I'll mark it. Dec 9, 2021 at 21:57
  • @javierMarquez - OK, glad that helped. I've added an answer now, plus some extra details.
    – Billy Kerr
    Dec 9, 2021 at 22:31

1 Answer 1


If it's not there, then you can just type it in directly like this:

<image image-rendering="optimizeSpeed" style= . . . . . ></image>

Also remember if the raster image already has some anti-aliasing then using this image-rendering option will not remove that. You'd have to edit the raster image itself, or use another image. All that the image-rendering option really does is show the image as it is in reality, without any pixel smoothing. If the image is already blurry this option won't clean it up.

One potential way to fix the raster image would be to open it in a raster image editor and apply some unsharp mask sharpening. Just don't go crazy with the sharpening or it will look horrible.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.