Modern websites rely heavily on graphics, UI assets, and icons to deliver an engaging user experience. However, choosing the wrong image format can negatively affect your page speed, mobile performance, layout responsiveness, and visual quality. Web designers and developers routinely struggle with selecting between image formats. Although formats like SVG and PNG may appear similar when rendered on a webpage, they are built on fundamentally different technologies. Using the wrong format can result in blurry, pixelated logos on high-density screens or massive file sizes that inflate bandwidth costs and slow down page loads.

The core difference lies in their underlying design philosophies: SVG is a vector graphic format, while PNG is a raster graphic format. Vector graphics represent images mathematically using coordinates, lines, curves, and shapes, which allows them to scale infinitely without losing quality. Raster graphics represent images using a fixed grid of colored squares (pixels), which limits their resolution and can result in pixelation when stretched. Understanding this fundamental technical division is the key to optimizing website performance, SEO, accessibility, and visual presentation.

Quick Recommendation

Not sure which image format or compression method to choose? Use this quick guide to make the right decision before reading the full article.

Use Case Recommended Format Why
Website Logo SVG Infinite scalability on all desktop, mobile, and Retina screen sizes
Icons & Symbols SVG Tiny file size, editable with CSS, and razor-sharp lines
UI Graphics SVG Crisp at every viewport resolution without bloating page weights
Photographs PNG (or WebP / AVIF) Supports complex pixel grids, gradients, and millions of colors
Screenshots PNG Preserves exact pixel borders, text readability, and interface lines
Transparent Graphics PNG (or WebP) Supports full 8-bit alpha channel transparency values
Infographics & Charts SVG Renders complex charts, vectors, and texts sharp at any scale
Physical Printing SVG Resolution-independent vector output prevents blurriness
💡 Pro Tip

Use SVG whenever possible for logos, icons, diagrams, charts, and illustrations because SVG scales infinitely without losing quality. Use PNG for screenshots, detailed graphics, or images containing complex pixel information.

1. What is SVG?

SVG stands for Scalable Vector Graphics. Introduced by the World Wide Web Consortium (W3C) in 1999, SVG is an XML-based vector image format designed specifically for the web. Unlike traditional binary image files (such as JPEGs or PNGs), an SVG file is actually a text document written in XML syntax. It defines shapes, lines, paths, curves, colors, and coordinates mathematically, which the web browser interprets and renders on the fly.

For example, if you draw a simple red circle in SVG, the file does not contain a grid of colored pixels. Instead, it contains a simple line of XML code like this:

<circle cx="50" cy="50" r="40" fill="red" />

Because the image is defined mathematically, the browser's rendering engine recalculates its geometry whenever it is scaled, zoomed, or displayed on high-resolution screens (like Apple's Retina displays). As a result, vector images remain razor-sharp at any size, from a tiny 16px browser favicon to a massive billboard screen.

2. What is PNG?

PNG stands for Portable Network Graphics. Developed in the mid-1990s as a patent-free replacement for the GIF format, PNG is a raster image format that represents graphics using a fixed grid of colored pixels (a bitmap). A PNG file defines the exact color and transparency value of every single pixel in the image grid.

PNG uses lossless compression (based on the Deflate algorithm), which means that it compresses image files without discarding any pixel data. This ensures that fine lines, text boundaries, and precise color borders remain perfectly clean and readable. PNG also supports full 8-bit alpha transparency, allowing pixels to be partially or fully transparent. This makes PNG the standard format for delivering complex, high-contrast graphics with transparent backgrounds, detailed screenshots, and digital artwork on the web.

3. Vector vs Raster Images

To choose between SVG and PNG, you must understand the difference between vector and raster graphics. The fundamental division lies in how the image is defined and rendered: mathematical equations versus fixed pixel grids. The diagram below illustrates the rendering pipelines of vector and raster images:

Vector (SVG) Pipeline XML Mathematical Instructions Dynamic Mathematical Scaling Always 100% Sharp Raster (PNG) Pipeline Fixed Grid of Colored Pixels Pixel Grid Stretched / Resized Blurs or Pixelates When Enlarged

Because vector images rely on mathematical formulas, they are completely resolution-independent. When you zoom in on an SVG circle, the browser recalculates the curves, ensuring the edge remains perfectly clean. On the other hand, when you zoom in on a PNG circle, the fixed pixel grid is simply stretched. The browser fills in the gaps, which makes the curved edges look blurry, fuzzy, or jagged (pixelated).

4. SVG Advantages

SVG offers key advantages for modern web design and performance optimization:

  • Infinite Scalability: Renders perfectly sharp at any scale, resolution, or display density (Retina, 4K, 5K, mobile).
  • Tiny File Sizes: For simple geometric designs, icons, charts, and logos, SVG files are incredibly small (often under 5 KB), which is much smaller than equivalent PNGs.
  • Fully Interactive & Animatable: Because SVG is XML code, its elements are part of the web document object model (DOM). You can style, hover-highlight, and animate SVG elements using standard CSS and JavaScript.
  • Searchable and SEO Friendly: Search engines can read, parse, and index the text inside SVG files natively, which helps your graphics rank in search results.
  • Easy inline integration: You can paste SVG code directly into your HTML document. This eliminates the need for separate HTTP requests, helping pages load faster.

5. PNG Advantages

While SVG is highly versatile, PNG remains the standard format for many use cases:

  • Complex Detail and Gradation Support: PNG is built to handle complex graphics, such as photographs, detailed digital paintings, and images containing millions of colors and gradients that vector formats cannot represent efficiently.
  • Universal Compatibility: Every image viewer, software application, design tool, operating system, and browser natively supports PNG.
  • Pixel-Perfect Screenshot Accuracy: PNG preserves exact pixel coordinates, font rendering, and sharp UI window borders, making it the best choice for software documentation screenshots.
  • Advanced 8-bit Alpha Transparency: Supports smooth transparent gradients, drop shadows, and semi-opaque overlays, which is highly useful for overlaying graphics on complex backgrounds.

6. SVG vs PNG Comparison

The table below provides a side-by-side comparison of the key features of SVG and PNG:

Feature SVG (Vector) PNG (Raster)
Resolution Resolution independent (infinite scale) Fixed resolution (pixelates when stretched)
File Format XML Source Code (Text-based) Binary Compressed Pixels
File Size (Simple Graphics) Extremely small (typically 1KB - 10KB) Moderate (typically 20KB - 150KB)
File Size (Complex Photos) Extremely large (vectorizing photos is highly inefficient) Moderate to large (lossless bitmap)
Transparency Yes (native empty canvas) Yes (full 8-bit alpha channel)
Animation Support Yes (via CSS/JavaScript/SMIL) No (static format)
Styling & Interactivity Yes (modifiable via CSS and JS) No (pre-rendered graphic)
SEO Crawlability High (text content searchable by bots) None (depends on alt attributes)
Accessibility High (semantic HTML structure) Low (requires external alt text)
Web UI Icons Highly recommended Not recommended (leads to blurriness)

7. Performance Comparison

Selecting the correct image format directly impacts website performance, load speeds, and Google Core Web Vitals. The key performance differences include:

1. HTTP Request Savings

Every external image file referenced via an `<img src="...">` tag requires a separate HTTP request, which increases network latency. Because SVGs are written in text code, you can paste them directly into your HTML document (inlining). This eliminates separate network requests, helping your page load faster.

2. Rendering and GPU Load

Rendering a PNG is computationally simple: the browser reads the compressed binary pixel grid and displays it directly on the screen. Rendering an SVG is more complex because the browser's layout engine must parse the XML paths, calculate geometries, and render the shapes. For simple icons and logos, this rendering overhead is negligible. However, if an SVG file contains complex coordinates (such as detailed map layouts or vector graphics with thousands of paths), the browser's rendering engine can suffer lag, especially on slower mobile devices. Use PNG for complex visual graphics.

3. Impact on Largest Contentful Paint (LCP)

LCP measures when the largest visual element on your page (such as a hero banner or featured image) becomes visible. Using heavy, uncompressed PNG files for these large layouts delays LCP. Converting large header backgrounds and graphic layouts to clean, optimized SVGs reduces file sizes from hundreds of kilobytes to only a few kilobytes, directly improving your PageSpeed scores.

8. SEO Considerations

Image selection has a direct impact on search engine optimization (SEO). Web crawlers evaluate both page performance and content crawlability:

  • XML Search Indexing: Because SVGs are written in XML code, search engine spiders (like Googlebot) can read and index the literal text content inside SVG files natively. This allows graphics like charts, diagrams, and maps to rank in search results based on their internal text content.
  • Page Speed Ranking Signals: Google uses page speed and user experience metrics as direct search ranking factors. Replacing heavy PNG files with lightweight SVGs improves page load times, helping your site rank higher.
  • Descriptive Image Alt Text: Static PNG files rely entirely on external `alt` attributes for search engines to understand their content. SVGs can contain semantic text inside `` and `<desc>` tags within the XML structure, providing search engines with built-in accessibility details.</li> </ul> <!-- SECTION 9 --> <h2 id="website-performance">9. Website Performance</h2> <p>Responsive web design requires images that adapt to varying screen sizes. Compressing and optimizing your images is a key web performance step:</p> <ul> <li><strong>Universal Screen Responsiveness:</strong> SVGs are natively responsive. A single SVG logo file scales automatically to match standard viewports, high-resolution screens, and print layouts, keeping the logo crisp without needing responsive source sets (`srcset`).</li> <li><strong>Bandwidth and Storage Savings:</strong> Replacing PNG icons and graphics with SVGs can save significant bandwidth. Reducing your page payload saves server disk space and bandwidth costs.</li> <li><strong>Optimizing PNG Files:</strong> For photographs and screenshots where PNG is required, always compress your files using local compression tools to reduce file size while maintaining visual quality.</li> </ul> <!-- SECTION 10 --> <h2 id="accessibility">10. Accessibility</h2> <p>Web accessibility (WCAG compliance) ensures your content can be read by screen readers. SVGs offer excellent accessibility features:</p> <ul> <li><strong>Accessible SVGs:</strong> SVGs support built-in screen reader access. By adding `<title id="title-id">` and `<desc id="desc-id">` tags inside the SVG code, and linking them using `aria-labelledby="title-id desc-id"` on the SVG container, screen readers can describe the vector graphic to visually impaired users.</li> <li><strong>Text Scalability:</strong> Text inside an SVG scales without pixelating. Visually impaired users can zoom in on charts and diagrams without the text becoming unreadable.</li> <li><strong>Static Image Alt Text:</strong> PNG images must always use descriptive `alt` tags to provide accessibility information, or use an empty `alt=""` attribute for decorative elements.</li> </ul> <!-- SECTION 11 --> <h2 id="best-use-cases">11. Best Use Cases</h2> <div class="usecase-grid"> <div class="usecase-card"> <h3><i data-lucide="vector" style="color: var(--color-primary); width: 20px; height: 20px;"></i> When to Use SVG</h3> <ul> <li><strong>Website Logos:</strong> Keeps company logos crisp on mobile, desktop, and print layouts.</li> <li><strong>UI Icons:</strong> Renders search icons, navigation menus, and buttons instantly at tiny file sizes.</li> <li><strong>Charts & Data Visualizations:</strong> Renders crisp charts and graphs with indexable text.</li> <li><strong>Simple Illustrations:</strong> Vector illustrations with solid colors and clean borders.</li> <li><strong>Animations:</strong> Dynamic, interactive website graphics.</li> </ul> </div> <div class="usecase-card"> <h3><i data-lucide="image" style="color: var(--color-primary); width: 20px; height: 20px;"></i> When to Use PNG</h3> <ul> <li><strong>Interface Screenshots:</strong> Keeps software screenshots and text guides crisp and readable.</li> <li><strong>Photos with Transparency:</strong> Photographic assets that require transparent backdrops.</li> <li><strong>Complex Artwork:</strong> Detailed paintings, illustrations, or graphics with intricate shading.</li> <li><strong>Backup Source Graphics:</strong> Storing high-fidelity source files for future editing.</li> <li><strong>Digital Paintings:</strong> Graphics featuring complex pixel detail and texture patterns.</li> </ul> </div> </div> <!-- SECTION 12 --> <h2 id="common-mistakes">12. Common Mistakes</h2> <p>Avoid these common image formatting mistakes to prevent speed issues or visual bugs:</p> <ol> <li><strong>Using PNG for Simple Website Logos:</strong> Leads to blurry logos on high-resolution screens and increases page weight. Use SVG instead.</li> <li><strong>Using SVG for Photographs:</strong> Vectorizing a photo creates millions of complex coordinates, resulting in massive file sizes and rendering lag. Use JPEG, WebP, or AVIF instead.</li> <li><strong>Failing to Optimize SVG Code:</strong> Design tools like Illustrator export SVGs with bloated metadata, editor trails, and unused styles. Always run SVGs through optimization tools to clean the code.</li> <li><strong>Using PNG for Complex Photography:</strong> Using PNG for photos on websites results in slow load speeds. Use WebP or JPEG instead, keeping PNG for screenshots and transparency.</li> <li><strong>Removing SVG Accessibility Tags:</strong> Removing `<title>` and `aria` attributes from SVGs breaks screen reader accessibility for disabled users.</li> <li><strong>Embedding PNGs Inside SVGs:</strong> Placing a PNG image inside an SVG wrapper increases file size while causing the image to pixelate when enlarged.</li> <li><strong>Ignoring Responsive PNG Sizes:</strong> Uploading a huge desktop PNG and scaling it down for mobile wastes significant bandwidth. Always resize images to their display dimensions.</li> <li><strong>Upscaling Low-Res PNG Files:</strong> Stretching a small PNG to fit a larger layout makes the image look blurry and pixelated.</li> <li><strong>Over-compressing PNG Assets:</strong> Compressing PNG files too aggressively can introduce visual artifacts and color distortion.</li> <li><strong>Ignoring SVG Security Risks:</strong> SVGs can execute JavaScript scripts. Never load unverified SVG files from third-party sources without checking the code.</li> </ol> <!-- SECTION 13 --> <h2 id="best-practices">13. Best Practices</h2> <p>Follow these 12 best practices to ensure your website graphics are fast, sharp, and accessible:</p> <ol> <li><strong>Use SVG for Logos and Icons:</strong> Ensure all website logos, menu icons, and navigation graphics are SVGs to keep them crisp and responsive.</li> <li><strong>Clean and Minify SVG Files:</strong> Optimize your SVG code to remove empty tags, metadata, and unused paths to keep file sizes tiny.</li> <li><strong>Inline Critical SVGs:</strong> Paste critical UI icons directly into your HTML document to save network requests and speed up initial page render.</li> <li><strong>Compress All PNG Files:</strong> Always compress PNG assets using local image optimization tools before uploading them to your server.</li> <li><strong>Specify Image Dimensions:</strong> Always define the width and height of SVG and PNG images in HTML to prevent layout shifts as pages load.</li> <li><strong>Adopt Modern Formats (WebP):</strong> Convert large PNG graphics to WebP to save up to 30% in file size while maintaining transparency.</li> <li><strong>Use SVGs for Dynamic Charts:</strong> Build charts and graphs as SVGs so search engines can read and index the internal text data.</li> <li><strong>Keep Uncompressed Backups:</strong> Always preserve your raw, uncompressed source files (PSD, AI, SVG) for future edits, applying compression only to web exports.</li> <li><strong>Add Alt Attributes to Images:</strong> Ensure all PNG files use descriptive `alt` tags to maintain web accessibility standards.</li> <li><strong>Style SVGs with CSS:</strong> Use CSS variables to control SVG fills, stroke colors, and hover effects dynamically across your site.</li> <li><strong>Verify Mobile Loading Speeds:</strong> Check your pages on mobile devices to ensure images load quickly and do not cause scroll lag.</li> <li><strong>Use Secure Browser-Based Tools:</strong> Use local browser tools to process, convert, and optimize your image files with complete data privacy.</li> </ol> <!-- SECTION 14 --> <h2 id="browser-based-image-conversion">14. Browser-Based Image Conversion</h2> <p>Many online converters require you to upload your files to their external servers for processing. This presents significant security and privacy risks, especially when handling confidential designs, corporate logos, internal screenshots, or copyrighted photography. Uploading these files exposes your assets to data leaks, storage retention risks, and copyright conflicts.</p> <p><strong>Browser-based local tools</strong> solve these privacy issues. Tools like <a href="../index.html">LocalTools</a> perform all conversion and compression tasks entirely in your browser's local sandbox using client-side JavaScript. This offers key advantages:</p> <ul> <li><strong>100% Privacy:</strong> Your images never leave your computer. There are no server uploads, no cloud storage, and no risk of data exposure.</li> <li><strong>Offline Capability:</strong> Once the page is loaded, the tool can convert images fully offline, making it highly secure and useful in areas without internet access.</li> <li><strong>Instant Processing:</strong> Because there are no network upload delays, compression happens instantly in your computer's RAM, speeding up your workflow.</li> <li><strong>No File Limits:</strong> Process large files without worrying about server limits, upload caps, or subscription fees.</li> </ul> <p>By using the <a href="../tools/png-to-jpg.html">LocalTools PNG to JPG Converter</a>, <a href="../tools/png-to-webp.html">PNG to WebP Converter</a>, and <a href="../tools/image-compressor.html">Image Compressor</a>, you get premium batch optimization features and real-time visual previews — all with complete local privacy.</p> <!-- RELATED ARTICLES / INTERNAL LINKS --> <div class="author-card"> <div class="author-avatar"> <i data-lucide="shield-check"></i> </div> <div class="author-info"> <h3>LocalTools Engineering</h3> <p>Providing high-performance, developer-centric utilities that process files 100% locally. Safe, private, and client-side utilities built for creators, designers, and developers.</p> </div> </div> <div class="cta-section"> <h3>Optimize Your Graphics Instantly and Safely</h3> <p style="margin-bottom: 20px;">Use our free, client-side tools to compress, resize, and convert your images locally with no cloud uploads.</p> <div class="cta-bullets"> <span><i data-lucide="check" style="color:var(--color-primary); width:16px; height:16px;"></i> 100% Offline Processing</span> <span><i data-lucide="check" style="color:var(--color-primary); width:16px; height:16px;"></i> Before / After Live Slider</span> <span><i data-lucide="check" style="color:var(--color-primary); width:16px; height:16px;"></i> Batch Upload ZIP Support</span> </div> <div style="display: flex; gap: 12px; justify-content: center; flex-wrap: wrap;"> <a href="../tools/png-to-webp.html" class="btn btn-primary">Convert PNG to WebP</a> <a href="../tools/image-compressor.html" class="btn btn-outline">Compress PNG Images</a> </div> </div> <!-- SECTION 15 --> <h2 id="frequently-asked-questions">15. Frequently Asked Questions</h2> <div class="faq-accordion"> <div class="accordion-item"> <div class="accordion-header"> <span>What is SVG?</span> <i data-lucide="chevron-down" style="width: 18px; height: 18px;"></i> </div> <div class="accordion-content"> <p>SVG stands for Scalable Vector Graphics. It is an XML-based vector image format that represents graphics using mathematical lines, curves, shapes, and points instead of a fixed pixel grid. This allows it to scale infinitely to any size without losing crispness.</p> </div> </div> <div class="accordion-item"> <div class="accordion-header"> <span>What is PNG?</span> <i data-lucide="chevron-down" style="width: 18px; height: 18px;"></i> </div> <div class="accordion-content"> <p>PNG stands for Portable Network Graphics. It is a raster image format that represents graphics using a fixed grid of colored pixels. PNG uses lossless compression, meaning it retains high-fidelity color details and full transparency channels.</p> </div> </div> <div class="accordion-item"> <div class="accordion-header"> <span>Which format is smaller in file size?</span> <i data-lucide="chevron-down" style="width: 18px; height: 18px;"></i> </div> <div class="accordion-content"> <p>For geometric graphics like logos, icons, UI elements, and simple diagrams, SVG is much smaller than PNG (often only a few kilobytes). However, for complex images like photographs or high-detail artwork containing thousands of colors, PNG is much smaller because representing these as vector shapes is highly inefficient.</p> </div> </div> <div class="accordion-item"> <div class="accordion-header"> <span>Can SVG replace PNG?</span> <i data-lucide="chevron-down" style="width: 18px; height: 18px;"></i> </div> <div class="accordion-content"> <p>Only for non-photographic graphics. SVG can completely replace PNG for logos, icons, diagrams, and illustrations. However, for photographs, screenshots, and digital paintings, PNG remains the standard format because vector graphics cannot represent pixel-specific detailing efficiently.</p> </div> </div> <div class="accordion-item"> <div class="accordion-header"> <span>Does SVG support transparency?</span> <i data-lucide="chevron-down" style="width: 18px; height: 18px;"></i> </div> <div class="accordion-content"> <p>Yes, fully. SVG supports transparency natively because it does not require a background canvas. Vector shapes are simply drawn in empty space, and you can style fills and strokes with varying opacity values using CSS.</p> </div> </div> <div class="accordion-item"> <div class="accordion-header"> <span>Is SVG better for SEO?</span> <i data-lucide="chevron-down" style="width: 18px; height: 18px;"></i> </div> <div class="accordion-content"> <p>Yes. Since SVG files contain XML source code, the text inside SVGs is searchable and can be read, crawled, and indexed directly by search engine bots. SVGs also load faster, which improves website speed ranking signals.</p> </div> </div> <div class="accordion-item"> <div class="accordion-header"> <span>Can SVG contain photographs?</span> <i data-lucide="chevron-down" style="width: 18px; height: 18px;"></i> </div> <div class="accordion-content"> <p>Yes, you can embed raster images (like JPEGs or PNGs) inside an SVG wrapper using the <image> tag. However, this defeats the primary advantage of vectors because the embedded photographic content will still pixelate when enlarged.</p> </div> </div> <div class="accordion-item"> <div class="accordion-header"> <span>Which format is better for logos?</span> <i data-lucide="chevron-down" style="width: 18px; height: 18px;"></i> </div> <div class="accordion-content"> <p>SVG is the best format for website logos. It scales instantly to match standard mobile viewports, high-resolution Retina screens, and large desktop layouts while keeping the text and lines perfectly crisp at a tiny file size.</p> </div> </div> <div class="accordion-item"> <div class="accordion-header"> <span>Is PNG lossless?</span> <i data-lucide="chevron-down" style="width: 18px; height: 18px;"></i> </div> <div class="accordion-content"> <p>Yes. PNG uses the Deflate compression algorithm. Unlike JPEG, it does not discard any pixel information during compression, making it a lossless raster format.</p> </div> </div> <div class="accordion-item"> <div class="accordion-header"> <span>Which format is better for mobile websites?</span> <i data-lucide="chevron-down" style="width: 18px; height: 18px;"></i> </div> <div class="accordion-content"> <p>SVG is superior for mobile icons, logos, and UI graphics because its tiny file size saves bandwidth and matches varying device resolutions dynamically. For photographs served on mobile, lightweight lossy formats like WebP or AVIF are preferred over PNG.</p> </div> </div> </div> <!-- SECTION 16 --> <h2 id="conclusion">16. Conclusion</h2> <p>SVG and PNG are both powerful image formats, but they serve entirely different purposes. Success on the web depends on choosing the correct format for each specific use case. SVG is the ideal choice for logos, user interface icons, charts, infographics, and simple illustrations because of its infinite scalability, small file size, and interactive properties. PNG is the superior choice for screenshots, complex artwork, and images requiring pixel-perfect detail that vector shapes cannot represent efficiently.</p> <p>Choosing the correct format directly improves your page speed, mobile performance, layout responsiveness, and SEO rankings. For photographic assets where PNG is too heavy, modern formats like WebP or AVIF should be used. Utilizing local, client-side tools to compress, convert, and optimize your images ensures your website remains fast and your data remains secure.</p> <p>Explore our suite of local image utilities, including the <a href="../tools/png-to-jpg.html">PNG to JPG Converter</a>, <a href="../tools/png-to-webp.html">PNG to WebP Converter</a>, <a href="../tools/webp-to-png.html">WebP to PNG Converter</a>, and <a href="../tools/image-compressor.html">Image Compressor</a> to optimize all your web graphics locally with complete privacy.</p> </div> <!-- RELATED ARTICLES --> <div style="margin-top: 56px; border-top: 1px solid var(--color-border); padding-top: 32px;"> <h3 style="font-size: 20px; font-weight: 700; color: var(--color-text); margin-bottom: 20px;">Related Insights</h3> <div class="related-articles-grid"> <a href="png-vs-jpg-explained.html" class="related-article-card"> <h3>PNG vs JPG Explained: Which Image Format Should You Use?</h3> <span>Understand the differences, compression types, and optimal web uses for PNG and JPG.</span> </a> <a href="webp-vs-png-which-format-is-better.html" class="related-article-card"> <h3>WebP vs PNG: Which Image Format Is Better?</h3> <span>A comprehensive comparison of WebP and PNG formats for web and performance.</span> </a> <a href="image-compression-explained-lossy-vs-lossless-compression.html" class="related-article-card"> <h3>Image Compression Explained: Lossy vs Lossless Compression</h3> <span>Learn how image compression works and the differences between lossy and lossless techniques.</span> </a> </div> </div> </article> </main> <footer class="footer-wrapper"> <div class="footer-container"> <div class="footer-brand-section"> <a href="../index.html" class="logo" style="margin-bottom: 16px;"> <div class="logo-icon" style="color: var(--color-primary); display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; background: rgba(249, 115, 22, 0.08); border-radius: 8px; padding: 6px;"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round" style="width: 100%; height: 100%;"> <path d="M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z" /> <path d="m12 7-3 5h4l-2 5 4-6h-3l2-4z" fill="currentColor" stroke="none" /> </svg> </div> <div class="logo-wordmark"> <span class="free">Local</span><span class="tool">Tools</span> </div> </a> <p style="font-size: 14px; color: var(--color-text-secondary); line-height: 1.6; max-width: 320px;">Free forever, privacy-first browser tools that process all your files locally inside your device. No cloud storage, no data uploads.</p> </div> <div class="footer-links-section" style="display: flex; gap: 48px; flex-wrap: wrap;"> <div style="display: flex; flex-direction: column; gap: 12px;"> <span style="font-weight: 700; color: var(--color-text); font-size: 14px; text-transform: uppercase; letter-spacing: 0.05em;">Popular Tools</span> <a href="../tools/image-compressor.html" style="font-size: 14px; color: var(--color-text-secondary); text-decoration: none;">Image Compressor</a> <a href="../tools/png-to-jpg.html" style="font-size: 14px; color: var(--color-text-secondary); text-decoration: none;">PNG to JPG</a> <a href="../tools/jpg-to-png.html" style="font-size: 14px; color: var(--color-text-secondary); text-decoration: none;">JPG to PNG</a> <a href="../tools/pdf-compressor.html" style="font-size: 14px; color: var(--color-text-secondary); text-decoration: none;">Compress PDF</a> </div> <div style="display: flex; flex-direction: column; gap: 12px;"> <span style="font-weight: 700; color: var(--color-text); font-size: 14px; text-transform: uppercase; letter-spacing: 0.05em;">Company</span> <a href="../about.html" style="font-size: 14px; color: var(--color-text-secondary); text-decoration: none;">About Us</a> <a href="../contact.html" style="font-size: 14px; color: var(--color-text-secondary); text-decoration: none;">Contact Us</a> <a href="../insights.html" style="font-size: 14px; color: var(--color-text-secondary); text-decoration: none;">Insights Blog</a> </div> </div> <div class="footer-row-4" style="width: 100%; border-top: 1px solid var(--color-border); padding-top: 24px; margin-top: 48px; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px;"> <span>© 2026 LocalTools. All rights reserved.</span> <div class="footer-legal-links"> <a href="../privacy-policy.html">Privacy Policy</a> <span class="footer-legal-separator">•</span> <a href="../terms.html">Terms of Service</a> <span class="footer-legal-separator">•</span> <a href="../disclaimer.html">Disclaimer</a> </div> </div> </div> </footer> <script src="../assets/js/global.js"></script> <script> // Init icons lucide.createIcons(); // Accordions const accHeaders = document.querySelectorAll('.accordion-header'); accHeaders.forEach(header => { header.addEventListener('click', () => { const item = header.parentElement; const content = item.querySelector('.accordion-content'); const isActive = item.classList.contains('active'); // Close all other accordions document.querySelectorAll('.accordion-item').forEach(accItem => { accItem.classList.remove('active'); accItem.querySelector('.accordion-content').style.maxHeight = null; }); if (!isActive) { item.classList.add('active'); content.style.maxHeight = content.scrollHeight + 'px'; } }); }); // Reading progress bar window.addEventListener('scroll', () => { const winScroll = document.body.scrollTop || document.documentElement.scrollTop; const height = document.documentElement.scrollHeight - document.documentElement.clientHeight; const scrolled = (winScroll / height) * 100; document.getElementById('reading-progress').style.width = scrolled + '%'; }); </script> </body> </html>