How to export for web in Illustrator

When you’re knee-deep in a fantastic design project in Adobe Illustrator, the last thing you want is for all your hard work to look… well, less than stellar when it finally hits the web. It’s a common pitfall, and frankly, a frustrating one. You’ve spent hours perfecting every curve, every gradient, every pixel, only for it to appear blurry, oversized, or just plain wrong on a website. The culprit? Often, it’s a misunderstanding of how to properly export for web Illustrator. It’s not just about hitting ‘Save As’; it’s about understanding the nuances that ensure your vector masterpiece translates perfectly to the rasterized world of screens.
Think of it this way: your Illustrator file is like a high-resolution film negative, full of rich detail and infinite scalability. When you prepare it for the web, you’re essentially developing a print – a specific size, resolution, and format tailored for immediate viewing. If you get that development process wrong, your beautiful negative becomes a grainy, pixelated mess. This guide will walk you through the essential steps, hidden features, and crucial considerations to make sure your web-bound graphics always look their absolute best, maintaining that crispness and vibrant color you worked so hard to achieve.
1. Understanding the ‘Save for Web (Legacy)’ Dialog: Your Command Center
For many years, the go-to panel for web optimization in Illustrator (and Photoshop) was the ‘Save for Web (Legacy)’ dialog. While Adobe has introduced newer export options, this legacy dialog remains incredibly powerful and offers a level of granular control that’s still invaluable for specific scenarios. To access it, you’ll go to File > Export > Save for Web (Legacy).... Don’t let the ‘legacy’ part fool you; this is still a powerhouse for web optimization. For more on this, see top computer graphics schools.
Once open, you’re greeted with a rather busy interface, but don’t be intimidated. The core of this dialog lies in its ability to preview your image in different formats and compression levels side-by-side. You’ll typically see ‘Original’, ‘Optimized’, ‘2-Up’, and ‘4-Up’ tabs at the top. The ‘2-Up’ and ‘4-Up’ views are your best friends here, allowing you to compare the original artwork with one or three different optimized versions. This visual comparison is critical for striking the right balance between file size and image quality, letting you see exactly how much detail you’re losing (or keeping) with each setting change.
2. Choosing the Right File Format: PNG, JPEG, or GIF?
This is arguably the most critical decision when you export for web Illustrator: which file format should you choose? Each has its strengths and weaknesses, and picking the wrong one can drastically impact both image quality and file size. It’s not a one-size-fits-all situation; the best choice depends entirely on the content of your graphic.
PNG (Portable Network Graphics) is your champion for graphics with transparency, sharp lines, and limited color palettes, like logos, icons, or illustrations with text. PNG-8 is excellent for simple graphics with up to 256 colors and full transparency, creating very small files. PNG-24, while larger, supports millions of colors and smooth alpha transparency (meaning gradients can have transparent areas), making it ideal for complex illustrations or photographs that need transparency. The key is that PNG uses lossless compression, meaning no image data is discarded, ensuring crisp edges and accurate colors.
JPEG (Joint Photographic Experts Group) is specifically designed for photographs and complex raster images with smooth color gradients and lots of detail. It uses lossy compression, which means it discards some image information to achieve smaller file sizes. You can control the level of compression, with higher quality leading to larger files and lower quality resulting in more artifacts (blockiness or blurriness). For most web use, a quality setting between 60-80% is a good starting point, offering a decent balance. Never use JPEG for images with sharp lines, text, or transparency, as the compression artifacts will make them look terrible.
GIF (Graphics Interchange Format) is an older format, primarily used today for simple animations or graphics with very few colors (up to 256). Like PNG-8, it supports transparency, but it’s a ‘hard’ transparency – pixels are either fully opaque or fully transparent, with no in-between states, leading to jagged edges around transparent areas. It’s generally fallen out of favor for static images due to PNG’s superior quality and transparency handling, but it still has its niche for basic animations.
3. Optimizing PNGs: The Transparency and Color Depth Dance
When you’re working with PNGs, especially for logos, icons, or illustrations that need to sit seamlessly on various backgrounds, proper optimization is crucial. The ‘Save for Web (Legacy)’ dialog gives you fine control over these settings. If your graphic has transparency, ensure the ‘Transparency’ checkbox is selected. You’ll then need to decide between PNG-8 and PNG-24. (See: Adobe Illustrator overview on Wikipedia.)
For most vector-based graphics that need transparency and have a limited number of colors (e.g., a company logo with a few brand colors), PNG-8 is often the best choice. It creates significantly smaller files than PNG-24. Within PNG-8, you can control the ‘Colors’ setting (e.g., 256, 128, 64, 32). The fewer colors you allow, the smaller the file, but you risk introducing banding or dither if your original artwork has subtle gradients. Use the ‘2-Up’ view to visually assess the quality degradation as you reduce the color count. For complex illustrations or images with gradients and transparency, PNG-24 is usually the way to go, accepting the larger file size for superior visual fidelity. Remember, a well-optimized PNG ensures your crisp vector work looks just as good on the web.
4. Mastering JPEGs: Quality vs. File Size
The art of optimizing JPEGs for the web is all about finding that sweet spot between image quality and file size. Because JPEG uses lossy compression, every time you save it, you’re potentially discarding data. The ‘Save for Web (Legacy)’ dialog’s JPEG settings are where you flex your control. You’ll find a ‘Quality’ slider, typically ranging from 0 to 100. For web use, anything above 80% is often overkill, resulting in unnecessarily large files with negligible visual improvement for most users.
A common practice is to start around 60-70% quality. Use the ‘2-Up’ or ‘4-Up’ preview to compare this against the original and maybe a slightly higher (75%) and lower (50%) quality setting. Pay close attention to areas with fine detail, smooth gradients, or text (if present, though JPEG isn’t ideal for text). You’ll notice artifacts appearing as you lower the quality too much – blockiness, color shifts, or a ‘muddiness’ in gradients. The goal is to find the lowest possible quality setting where the image still looks great on screen, saving valuable bandwidth for your users. Don’t forget the ‘Optimized’ checkbox; it applies a slightly more efficient compression algorithm without further reducing quality.
5. Controlling Image Dimensions and Resampling: The Pixel Perfect Approach
One of the most common mistakes when you export for web Illustrator is neglecting image dimensions. Exporting a 3000px wide image when it’s only going to be displayed at 500px wide on a webpage is a waste of bandwidth and processing power. In the ‘Save for Web (Legacy)’ dialog, look for the ‘Image Size’ section. Here, you can specify the exact width and height in pixels that your image needs to be on the web.
Always make sure the ‘Constrain Proportions’ (chain link icon) is enabled to avoid distorting your image. The ‘Resample’ dropdown is also critical. ‘Bicubic’ is generally a good all-around choice for scaling down, providing a good balance of sharpness and smooth transitions. ‘Bicubic Sharper’ is excellent for reducing image size while trying to maintain detail, making it ideal for photos. ‘Bicubic Smoother’ is better for enlarging images. While Illustrator is vector-based, once you export it as a raster format (like PNG or JPEG), those dimensions are fixed. Exporting at 1x (the exact size it will appear) is always preferable, but consider exporting at 2x or even 3x for high-DPI (Retina) displays if your design system requires it, then letting CSS handle the scaling down on the front end.
6. Dealing with Artboards and Slices: Precision Exporting
Illustrator’s artboards are incredibly useful for organizing multiple designs within a single file. When it’s time to export for web Illustrator, you often don’t want to export the entire document. The ‘Save for Web (Legacy)’ dialog allows you to specify which artboard you want to export. Below the preview area, you’ll see options to select ‘All Artboards’ or a specific range (e.g., ‘1-3’). This is a huge time-saver when you have, say, a dozen different icon variations or banner ads in one file.
Slices, while a bit more niche these days with modern web development practices, still offer a powerful way to break a large image into smaller, optimized pieces. You can create slices using the ‘Slice Tool’ (part of the crop tool group) or by converting guides or objects into slices. When you export, Illustrator will then save each slice as a separate image, often generating an accompanying HTML file to reassemble them. This was particularly useful in the early days of web design for complex layouts or for optimizing different parts of an image with varying compression settings (e.g., a photo part as JPEG, a text part as PNG). While CSS and modern image formats have largely superseded slices for layout, they can still be useful for sprite sheets or very specific optimization tasks.
7. The Modern Export Experience: ‘Export As’ and ‘Export for Screens’
While ‘Save for Web (Legacy)’ is a venerable tool, Adobe has introduced more streamlined and modern export workflows that are often more efficient, especially for exporting multiple assets or catering to different screen resolutions. These are found under File > Export.
The ‘Export As…’ option (File > Export > Export As...) is straightforward for exporting a single artboard or your entire canvas to various raster formats (PNG, JPEG, SVG, TIFF, etc.). It’s simpler than ‘Save for Web (Legacy)’, offering fewer optimization controls but a quicker way to get a file out. You can specify the resolution (e.g., 72ppi for web) and choose your format. For basic, quick exports, this is often sufficient, especially if you’re not obsessing over every kilobyte. (See: CDC guidelines on graphic design.)
However, the real game-changer for modern web and app design is ‘Export for Screens…’ (File > Export > Export for Screens...). This dialog is built for efficiency, allowing you to export multiple artboards or individual assets (selected objects) at various scales (e.g., 1x, 2x, 3x for different screen densities) and in multiple formats simultaneously. You can select specific artboards or assets, choose your desired formats (PNG, JPG, SVG, PDF), and add different scale factors. For instance, you could export a logo at 1x PNG, 2x PNG, and an SVG all at once, saving immense amounts of time compared to exporting each version individually. This is the workflow you want to adopt if you’re regularly exporting icons, UI elements, or responsive graphics for a design system.
What About SVG? The Vector Native Solution
Before we wrap up, it’s critical to talk about SVG (Scalable Vector Graphics). For any graphic that is purely vector-based in Illustrator – logos, icons, illustrations without raster effects or photos – SVG is almost always the superior choice for the web. Why? Because SVG is a vector format itself. It’s essentially an XML-based text file that describes your graphic using mathematical paths, not pixels. This means:
- Infinite Scalability: SVGs look perfectly crisp at any size, on any screen, from a tiny favicon to a massive billboard. No pixelation, ever.
- Small File Sizes: Often, SVGs are significantly smaller than equivalent PNGs or JPEGs, especially for simple graphics.
- Editability: You can manipulate SVGs with CSS and JavaScript, allowing for dynamic changes, animations, and interactivity directly in the browser.
- Accessibility: Because it’s text-based, screen readers can interpret SVG content.
To export an SVG, use File > Export > Export As... and choose SVG as the format. In the SVG Options dialog, keep it simple: ‘Presentation Attributes’ for CSS properties, ‘Minify’ for smallest file size, and ‘Link’ for images if you have embedded rasters. For web usage, SVG 1.1 is generally fine. The only time SVG isn’t ideal is for complex photographic images or when you’ve used raster effects extensively in Illustrator, as these will be converted to embedded rasters within the SVG, negating many of its benefits.
Prepping Your Artwork for Export: A Quick Checklist
Before you even hit that export button, a little preparation goes a long way in ensuring a clean and optimized final product:
- Outline All Fonts: If your graphic contains text, convert it to outlines (
Type > Create Outlines) before exporting to ensure it renders correctly on any system, regardless of whether the font is installed. Do this on a copy of your file, though, so you can still edit the text in your original. - Embed All Linked Images: If you’ve linked raster images in your Illustrator file, embed them (select the image, then in the ‘Links’ panel, choose ‘Embed Image’) to ensure they are part of the exported file. Otherwise, they might appear broken.
- Clean Up Unused Elements: Remove any elements outside your artboard or on hidden layers that aren’t necessary for the final web graphic. They might not be visible but can still contribute to file size.
- Expand Strokes and Effects: For some complex stroked paths or live effects, expanding them (
Object > Expand AppearanceorObject > Expand) can prevent unexpected rendering issues in specific export formats, especially SVG. - Use Artboards Wisely: Position your artwork correctly on artboards, as the export process often uses artboard boundaries as the cropping area.
8. The Rise of Modern Image Formats: WebP and AVIF
The landscape of web image formats isn’t static. While PNG, JPEG, and SVG remain workhorses, newer formats like WebP and AVIF are gaining significant traction due to their superior compression and features. These aren’t natively supported in Illustrator’s standard ‘Save for Web (Legacy)’ or ‘Export As’ options, but they’re important to know about for comprehensive web optimization.
- WebP: Developed by Google, WebP offers both lossless and lossy compression. It typically achieves significantly smaller file sizes than JPEG or PNG while maintaining comparable (or even better) visual quality. It supports transparency and animation, effectively acting as a modern replacement for JPEG, PNG, and GIF. Browser support for WebP is excellent across most modern browsers. You’d typically export your image as a PNG or JPEG from Illustrator and then use a separate tool (like online converters, command-line tools, or image optimization plugins for your CMS) to convert it to WebP.
- AVIF: Standing for AV1 Image File Format, AVIF is an even newer, open-source image format based on the AV1 video codec. It boasts even better compression ratios than WebP, meaning you can achieve the same quality at even smaller file sizes. AVIF also supports transparency and HDR (High Dynamic Range) images. Browser support is growing rapidly, but it’s not as universal as WebP yet. Like WebP, you’ll need external tools to convert your Illustrator exports into AVIF.
While Illustrator doesn’t directly export to these cutting-edge formats, understanding their benefits is crucial. The workflow often involves exporting a high-quality PNG or JPEG from Illustrator and then leveraging server-side solutions or external conversion tools to serve WebP or AVIF to supported browsers. This “srcset” approach (where the browser chooses the best format) ensures maximum compatibility and performance.
9. Color Profiles and Consistency: Avoiding Washed-Out Colors
Ever exported a beautiful, vibrant graphic from Illustrator only to see it appear dull or desaturated on the web? This frustrating issue often boils down to color profiles. Illustrator works in a wide color gamut (typically sRGB or Adobe RGB), but web browsers primarily display colors using the sRGB (Standard Red Green Blue) color space.
When you export for web, it’s vital to ensure your colors are converted to sRGB. In the ‘Save for Web (Legacy)’ dialog, make sure the ‘Convert to sRGB’ checkbox is selected. If you’re using ‘Export As’ or ‘Export for Screens,’ you’ll usually find an option to include or convert to sRGB in the format-specific settings. Failing to do this can lead to noticeable color shifts, especially for reds and blues, making your carefully chosen palette look off. It’s a small checkbox that makes a huge difference in maintaining color fidelity from your design environment to the browser. (See: New York Times on web design practices.) There’s a fuller look at Edrater's best colleges list.
Frequently Asked Questions About Exporting for Web in Illustrator
Q1: Why do my Illustrator exports look blurry on the web?
A: Blurry images are usually due to incorrect dimensions or resolution. When exporting raster formats (PNG, JPEG), ensure you set the image dimensions in pixels to the exact size it will appear on the webpage. Exporting a small image and then scaling it up in HTML/CSS, or exporting a very large image and scaling it down without proper resampling, can both cause blurriness. For logos and icons, consider using SVG to ensure infinite crispness.
Q2: Should I use ‘Save for Web (Legacy)’ or ‘Export for Screens’?
A: It depends on your needs. ‘Save for Web (Legacy)’ offers the most granular control over compression settings, especially for PNGs and JPEGs, and is great for optimizing a single image to the smallest possible file size. ‘Export for Screens’ is far more efficient for exporting multiple assets, artboards, or different resolutions (like @1x, @2x, @3x) simultaneously. For modern responsive web design, ‘Export for Screens’ is often the preferred workflow for its speed and versatility.
Q3: What’s the best resolution (PPI/DPI) for web images?
A: For web, the standard resolution is 72 PPI (pixels per inch). However, PPI is largely irrelevant for web images; what truly matters are the pixel dimensions (width x height). A 1000px wide image will display the same physical size on a screen whether it’s saved at 72 PPI or 300 PPI. Focus on setting the correct pixel dimensions. For high-DPI (Retina) screens, you might export at 2x or 3x the intended display size and let CSS handle the scaling, but the base resolution remains pixel-based, not PPI-based.
Q4: My transparent PNGs have jagged edges or a halo effect. What’s wrong?
A: This often happens with PNG-8 when your graphic has subtle gradients or anti-aliased edges that interact with transparency. PNG-8 uses ‘hard’ transparency and a limited color palette. For smooth transparency and anti-aliased edges, you should use PNG-24. While PNG-24 files are larger, they support alpha transparency and millions of colors, which will eliminate jagged edges and halos around complex transparent areas.
Q5: When should I use SVG instead of PNG or JPEG?
A: Always use SVG for purely vector graphics like logos, icons, illustrations, or any graphic that doesn’t contain raster images or complex raster effects. SVGs are infinitely scalable without pixelation, often have smaller file sizes, and can be manipulated with CSS/JavaScript. Use PNG for raster graphics with transparency (like complex illustrations or screenshots) and JPEG for photographs or images with rich, continuous tones without transparency.
Mastering the art of how to export for web Illustrator isn’t just about knowing where the buttons are; it’s about making informed decisions. It’s about understanding the interplay between file formats, compression, dimensions, color profiles, and the specific needs of your web project. By taking the time to properly optimize your graphics, you’re not just creating smaller files; you’re ensuring your designs shine online, load faster for your audience, and maintain the professional quality you worked so hard to achieve. So next time you finish that incredible design, remember these secrets – your website (and your users) will thank you for it.
Trending Now
Frequently Asked Questions
How do I export an image for web in Illustrator?
To export an image for the web in Illustrator, go to File > Export > Save for Web (Legacy). This dialog allows you to optimize your graphics by adjusting settings like file format, quality, and dimensions, ensuring your design looks sharp and vibrant on screens.
What is the best format to export from Illustrator for web?
The best format to export from Illustrator for web depends on your design. For images with transparency or gradients, use PNG. For photographic images, JPEG is ideal. SVG is great for vector graphics, preserving scalability without loss of quality.
Why does my Illustrator export look blurry?
If your Illustrator export looks blurry, it may be due to incorrect resolution settings or exporting at a size larger than intended. Ensure you use the 'Save for Web (Legacy)' dialog to set the appropriate resolution and dimensions for optimal display on screens.
What does 'Save for Web' do in Illustrator?
'Save for Web' in Illustrator optimizes your designs for online use by compressing file sizes and converting them to web-friendly formats. This feature helps maintain image quality while ensuring faster loading times on websites.
How can I maintain quality when exporting from Illustrator?
To maintain quality when exporting from Illustrator, use the 'Save for Web (Legacy)' dialog to control settings like file format, quality, and resolution. Pay attention to dimensions and choose the right format based on your design to ensure clarity and vibrancy.
What did we miss? Let us know in the comments and join the conversation.




