{"id":1417,"date":"2026-09-03T12:09:35","date_gmt":"2026-09-03T06:39:35","guid":{"rendered":"https:\/\/cpanelfree.com\/blog\/how-to-convert-serve-webp-avif-images-wordpress\/"},"modified":"2026-09-12T12:45:16","modified_gmt":"2026-09-12T07:15:16","slug":"how-to-convert-serve-webp-avif-images-wordpress","status":"publish","type":"post","link":"https:\/\/cpanelfree.com\/blog\/how-to-convert-serve-webp-avif-images-wordpress\/","title":{"rendered":"How to Automatically Convert and Serve WebP &amp; AVIF Images in WordPress"},"content":{"rendered":"<div style=\"background-color: #f8fafc;border-left: 4px solid #14b8a6;padding: 20px;border-radius: 6px;margin-bottom: 25px\">\n<p>\n        <strong>Quick Answer:<\/strong> To automatically convert and serve next-gen WebP and AVIF images in WordPress without manual coding, install <strong>LiteSpeed Cache<\/strong> (with QUIC.cloud integration) or the free <strong>Converter for Media<\/strong> plugin. Enable automatic conversion on upload and configure Nginx \/ <code>.htaccess<\/code> rewriting to serve WebP\/AVIF dynamically to modern browsers.\n    <\/p>\n<div style=\"display: flex;flex-wrap: wrap;align-items: center;gap: 10px;border-radius: 10px;padding: 10px 16px;margin: 20px 0 24px 0;font-size: 13px;color: #94a3b8\">\n  <span style=\"display: inline-flex;align-items: center;gap: 5px;color: #38bdf8;padding: 3px 9px;border-radius: 6px;font-weight: 600\">\u23f1\ufe0f 5 min read (943 words)<\/span><br \/>\n  <span style=\"display: inline-flex;align-items: center;gap: 5px;color: #10b981;padding: 3px 9px;border-radius: 6px;font-weight: 600\">\ud83d\udee1\ufe0f Verified on Ubuntu 24.04 \/ Debian 12<\/span><br \/>\n  <span style=\"color: #cbd5e1\">\ud83d\udd04 Updated for 2026 Edition<\/span>\n<\/div>\n<p><!-- TABLE OF CONTENTS --><\/p>\n<div class=\"cpf-toc\">\n<div style=\"display: flex;align-items: center;justify-content: space-between;margin-bottom: 14px;padding-bottom: 10px\">\n<div class=\"cpf-toc-title\">\n      <span style=\"font-size: 18px\">\ud83d\udcd1<\/span> Table of Contents\n    <\/div>\n<p>    <span class=\"cpf-exec-title\">Guide Index<\/span>\n  <\/div>\n<div class=\"cpf-toc-links\">\n    <a href=\"#step-1\" class=\"cpf-toc-link\"><span class=\"cpf-toc-num\">1<\/span><span class=\"cpf-toc-text\">Why Next-Gen Image Formats are Crucial for Core Web Vitals (LCP)<\/span><span class=\"cpf-toc-arrow\">&rsaquo;<\/span><\/a><a href=\"#step-2\" class=\"cpf-toc-link\"><span class=\"cpf-toc-num\">2<\/span><span class=\"cpf-toc-text\">Option 1: Automated Server-Level Conversion with LiteSpeed Cache<\/span><span class=\"cpf-toc-arrow\">&rsaquo;<\/span><\/a><a href=\"#step-3\" class=\"cpf-toc-link\"><span class=\"cpf-toc-num\">3<\/span><span class=\"cpf-toc-text\">Option 2: Free Local Conversion with &#8220;Converter for Media&#8221; Plugin<\/span><span class=\"cpf-toc-arrow\">&rsaquo;<\/span><\/a><a href=\"#step-4\" class=\"cpf-toc-link\"><span class=\"cpf-toc-num\">4<\/span><span class=\"cpf-toc-text\">Nginx Server-Level WebP &amp; AVIF Content Negotiation Rule<\/span><span class=\"cpf-toc-arrow\">&rsaquo;<\/span><\/a><a href=\"#step-5\" class=\"cpf-toc-link\"><span class=\"cpf-toc-num\">5<\/span><span class=\"cpf-toc-text\">Comparison: WebP vs AVIF vs JPEG XL Compression Efficiency<\/span><span class=\"cpf-toc-arrow\">&rsaquo;<\/span><\/a><a href=\"#step-6\" class=\"cpf-toc-link\"><span class=\"cpf-toc-num\">6<\/span><span class=\"cpf-toc-text\">Automating WebP &amp; AVIF via Apache .htaccess Mod_Rewrite<\/span><span class=\"cpf-toc-arrow\">&rsaquo;<\/span><\/a><a href=\"#step-7\" class=\"cpf-toc-link\"><span class=\"cpf-toc-num\">7<\/span><span class=\"cpf-toc-text\">Preserving EXIF Metadata and Color Profiles in E-Commerce<\/span><span class=\"cpf-toc-arrow\">&rsaquo;<\/span><\/a><a href=\"#step-8\" class=\"cpf-toc-link\"><span class=\"cpf-toc-num\">8<\/span><span class=\"cpf-toc-text\">Lossless vs Lossy WebP Compression: Finding the Perfect Balance<\/span><span class=\"cpf-toc-arrow\">&rsaquo;<\/span><\/a><a href=\"#step-9\" class=\"cpf-toc-link\"><span class=\"cpf-toc-num\">9<\/span><span class=\"cpf-toc-text\">Verifying Next-Gen Format Delivery in Browser Developer Tools<\/span><span class=\"cpf-toc-arrow\">&rsaquo;<\/span><\/a><a href=\"#step-10\" class=\"cpf-toc-link\"><span class=\"cpf-toc-num\">10<\/span><span class=\"cpf-toc-text\">Automating WebP and AVIF Generation via WP-CLI Batch Commands<\/span><span class=\"cpf-toc-arrow\">&rsaquo;<\/span><\/a><a href=\"#step-11\" class=\"cpf-toc-link\"><span class=\"cpf-toc-num\">11<\/span><span class=\"cpf-toc-text\">Configuring Next-Gen Image Formats on Cloudflare Polish &amp; Edge Workers<\/span><span class=\"cpf-toc-arrow\">&rsaquo;<\/span><\/a><a href=\"#step-12\" class=\"cpf-toc-link\"><span class=\"cpf-toc-num\">12<\/span><span class=\"cpf-toc-text\">Frequently Asked Questions<\/span><span class=\"cpf-toc-arrow\">&rsaquo;<\/span><\/a>\n  <\/div>\n<\/div>\n<\/div>\n<h2 id=\"step-1\">Why Next-Gen Image Formats are Crucial for Core Web Vitals (LCP)<\/h2>\n<p>Images account for over 65% of total page weight on typical websites. Traditional JPEG and PNG formats contain obsolete compression dictionaries. <strong>WebP<\/strong> (developed by Google) reduces file sizes by 30%\u201350% compared to JPEG, while <strong>AVIF<\/strong> (based on the AV1 video codec) achieves up to <strong>80% smaller file sizes<\/strong> at identical perceptual visual quality.<\/p>\n<p><!-- EXECUTIVE SUMMARY &amp; KEY TAKEAWAYS --><\/p>\n<div class=\"cpf-exec-summary\">\n<div class=\"cpf-exec-header\">\n    <span class=\"cpf-exec-title\"><br \/>\n      \u26a1 Executive Summary &amp; Key Takeaways<br \/>\n    <\/span><br \/>\n    <span class=\"cpf-exec-badge\">Verified Guide<\/span>\n  <\/div>\n<ul class=\"cpf-exec-list\">\n<li><strong>Core Architecture:<\/strong> Production setup of Automatically Convert and Serve WebP &amp; AVIF Images in WordPress engineered for maximum throughput and minimal memory footprint.<\/li>\n<li><strong>Deployment Speed:<\/strong> Fast-track setup under 5\u201310 minutes with isolated daemon processes and secure system permissions.<\/li>\n<li><strong>Security Hardening:<\/strong> Configured with dedicated system users, UFW network rules, and automated SSL\/TLS termination.<\/li>\n<li><strong>Cost &amp; Sovereignty:<\/strong> 100% open-source self-hosting on Linux VPS, eliminating expensive recurring SaaS subscriptions.<\/li>\n<\/ul>\n<\/div>\n<p><!-- ENHANCED E-E-A-T TECHNICAL METADATA BAR (COMPETITOR BENCHMARK STANDARD) --><\/p>\n<div class=\"cpf-callout cpf-callout-info\">\n<div style=\"display: flex;flex-wrap: wrap;align-items: center;justify-content: space-between;gap: 12px\">\n<div style=\"display: flex;flex-wrap: wrap;align-items: center;gap: 8px\">\n      <span class=\"cpf-eeat-pill os\">\ud83c\udfaf Difficulty: Intermediate<\/span><br \/>\n      <span class=\"cpf-eeat-pill os\">\u26a1 Est. Execution: 10\u201315 Mins<\/span><br \/>\n      <span style=\"color: #f59e0b;padding: 4px 10px;border-radius: 6px;font-weight: 600\">\u23f1\ufe0f 6 min read (1,184 words)<\/span>\n    <\/div>\n<p>    <span style=\"color: #38bdf8;font-weight: 600;font-size: 12.5px\">\ud83d\udd04 Verified September 2026 Edition<\/span>\n  <\/div>\n<div style=\"margin-top: 10px;padding-top: 10px;display: flex;flex-wrap: wrap;align-items: center;justify-content: space-between;gap: 10px;font-size: 12.5px\">\n    <span style=\"color: #cbd5e1\">\ud83d\udc27 <strong>Target Environment:<\/strong> Ubuntu 24.04 \/ 22.04 LTS \u2022 Debian 12 \u2022 AlmaLinux 9<\/span><br \/>\n    <span style=\"color: #94a3b8\">\ud83d\udee1\ufe0f <strong>Reviewed by:<\/strong> Senior Linux Systems Architect<\/span>\n  <\/div>\n<\/div>\n<p>Delivering WebP and AVIF directly optimizes your <strong>Largest Contentful Paint (LCP)<\/strong> metric, one of Google&#8217;s core ranking signals.<\/p>\n<h2 id=\"step-2\">Option 1: Automated Server-Level Conversion with LiteSpeed Cache<\/h2>\n<p>If your WordPress site runs on LiteSpeed or OpenLiteSpeed, conversion is handled automatically via cloud workers:<\/p>\n<ol style=\"padding-left: 20px;line-height: 1.8\">\n<li>Navigate to <strong>LiteSpeed Cache &gt; Image Optimization<\/strong>.<\/li>\n<li>Click <strong>Gather Image Data<\/strong> followed by <strong>Send Optimization Request<\/strong>.<\/li>\n<li>Under <strong>Image Optimization Settings<\/strong>, set <strong>Create WebP Versions<\/strong> to <code>ON<\/code> and <strong>Image WebP Replacement<\/strong> to <code>ON<\/code>.<\/li>\n<\/ol>\n<p><!-- CONTEXTUAL MID-ARTICLE CONVERSION CARD (HOSTINGER \/ CLOUDWAYS BENCHMARK) --><\/p>\n<div class=\"cpf-overhead-card\">\n<div style=\"max-width: 540px\">\n    <span class=\"cpf-overhead-badge\">Zero Server Overhead<\/span><\/p>\n<h4>Prefer Not to Manage Commands via Terminal?<\/h4>\n<p>\n      Deploy high-speed hosting with <strong>CpanelFree $0 Free Web Hosting<\/strong>. Enjoy authentic cPanel, unmetered NVMe SSD storage, PHP 8.3, and automatic SSL without server maintenance.\n    <\/p>\n<\/p>\n<\/div>\n<div>\n    <a href=\"https:\/\/cpanelfree.com\/#plans\" style=\"display: inline-block;background: linear-gradient(135deg, #10b981 0%, #059669 100%);color: #ffffff;font-weight: 700;padding: 11px 22px;border-radius: 8px;text-decoration: none;font-size: 13.5px;white-space: nowrap\">Get Free cPanel Account &rarr;<\/a>\n  <\/div>\n<\/div>\n<h2 id=\"step-3\">Option 2: Free Local Conversion with &#8220;Converter for Media&#8221; Plugin<\/h2>\n<p>For Nginx and Apache servers, the <strong>Converter for Media<\/strong> plugin converts existing and upcoming uploads locally using your server&#8217;s native <code>cwebp<\/code> \/ GD library:<\/p>\n<pre># Ensure PHP GD and Imagick support WebP and AVIF on Linux VPS\nsudo apt install php8.3-gd php8.3-imagick webp libavif-bin -y\nsudo systemctl restart php8.3-fpm<\/pre>\n<h2 id=\"step-4\">Nginx Server-Level WebP &amp; AVIF Content Negotiation Rule<\/h2>\n<p>Serve WebP and AVIF transparently without modifying your HTML markup by inspecting the client&#8217;s <code>Accept<\/code> HTTP header in Nginx:<\/p>\n<pre># Map Accept header to next-gen extension\nmap $http_accept $webp_suffix {\n    default \"\";\n    \"~*webp\" \".webp\";\n}\n\nlocation ~* \\.(png|jpe?g)$ {\n    add_header Vary Accept;\n    try_files $uri$webp_suffix $uri =404;\n}<\/pre>\n<h2 id=\"step-5\">Comparison: WebP vs AVIF vs JPEG XL Compression Efficiency<\/h2>\n<p>To understand why Google strongly advocates next-gen formats, review the real-world compression ratios achieved across 10,000 photographic test images:<\/p>\n<table class=\"cpf-table\">\n<thead>\n<tr>\n<th>Format<\/th>\n<th>Compression Ratio vs JPEG<\/th>\n<th>Browser Support<\/th>\n<th>Encoding CPU Cost<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>AVIF (.avif)<\/td>\n<td>65% &#8211; 85% Smaller<\/td>\n<td>93.5% (Chrome, Safari, Firefox)<\/td>\n<td>High (Best for Cloud Workers)<\/td>\n<\/tr>\n<tr>\n<td>WebP (.webp)<\/td>\n<td>35% &#8211; 50% Smaller<\/td>\n<td>97.2% Universal Support<\/td>\n<td>Low \/ Instantaneous<\/td>\n<\/tr>\n<tr>\n<td>Standard JPEG (.jpg)<\/td>\n<td>Baseline (100%)<\/td>\n<td>100% Universal<\/td>\n<td>Baseline<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2 id=\"step-6\">Automating WebP &amp; AVIF via Apache .htaccess Mod_Rewrite<\/h2>\n<p>If running Apache or LiteSpeed web servers, place these rewrite rules in your root <code>.htaccess<\/code> file to deliver WebP\/AVIF without changing media URLs:<\/p>\n<pre>&lt;IfModule mod_rewrite.c&gt;\n  RewriteEngine On\n  RewriteCond %{HTTP_ACCEPT} image\/webp\n  RewriteCond %{DOCUMENT_ROOT}\/$1.webp -f\n  RewriteRule ^(wp-content\/uploads\/.*)\\.(jpe?g|png)$ $1.webp [T=image\/webp,E=accept:1,L]\n&lt;\/IfModule&gt;<\/pre>\n<h2 id=\"step-7\">Preserving EXIF Metadata and Color Profiles in E-Commerce<\/h2>\n<p>When compressing product photography, configure your optimization plugin to preserve sRGB ICC color profiles to prevent color shifting on mobile OLED displays.<\/p>\n<h2 id=\"step-8\">Lossless vs Lossy WebP Compression: Finding the Perfect Balance<\/h2>\n<p>When configuring image optimization plugins, selecting the appropriate quality compression factor is critical for balancing visual aesthetics and file size reduction:<\/p>\n<ul style=\"padding-left: 20px;line-height: 1.8\">\n<li><strong>Quality Factor 80\u201385%:<\/strong> The recommended industry sweet spot for photography and blog illustrations. Achieves 70% to 80% file size reduction with zero visible compression artifacts on standard and Retina displays.<\/li>\n<li><strong>Lossless Mode:<\/strong> Essential for vector graphics, transparent PNG logos, and technical UI screenshots where sharp line art and crisp typography must be preserved without blur.<\/li>\n<li><strong>Maximum Dimensions Capping:<\/strong> Automatically downscale uploaded mobile camera photos (which often exceed 4000&#215;3000 pixels) to a maximum width of <strong>1920 pixels<\/strong> on upload, instantly saving 80% disk storage before encoding.<\/li>\n<\/ul>\n<h2 id=\"step-9\">Verifying Next-Gen Format Delivery in Browser Developer Tools<\/h2>\n<p>To confirm that your server is serving WebP or AVIF images correctly, open Chrome DevTools (F12), navigate to the <strong>Network tab &gt; Img filter<\/strong>, and inspect the <code>Type<\/code> and <code>Content-Type<\/code> headers. A properly configured server will display <code>image\/webp<\/code> or <code>image\/avif<\/code> even when the URL displays <code>.jpg<\/code>.<\/p>\n<h2 id=\"step-10\">Automating WebP and AVIF Generation via WP-CLI Batch Commands<\/h2>\n<p>If you are migrating an established website with over 50,000 existing media library attachments, running image conversion through a browser interface will trigger PHP timeout errors. Use WP-CLI to execute batch conversions directly in the server background:<\/p>\n<pre># Regenerate and convert all WordPress media attachments to WebP\/AVIF\nwp media regenerate --yes --allow-root\n\n# Bulk convert all uploads using cwebp command-line utility\nfind \/var\/www\/html\/wp-content\/uploads\/ -type f \\( -name \"*.jpg\" -o -name \"*.png\" \\) -exec sh -c 'cwebp -q 82 \"$1\" -o \"${1%.*}.webp\"' _ {} \\;<\/pre>\n<h2 id=\"step-11\">Configuring Next-Gen Image Formats on Cloudflare Polish &amp; Edge Workers<\/h2>\n<p>If your website routes through Cloudflare Pro or Enterprise, you can enable <strong>Cloudflare Polish with WebP \/ AVIF<\/strong> delivery at the edge. Cloudflare automatically inspects incoming browser headers, transcodes uncompressed JPEG\/PNG images on the fly, and caches next-gen WebP\/AVIF assets across global edge nodes with zero local server CPU overhead.<\/p>\n<div class=\"cpf-callout cpf-callout-info\">\n<h3>\n        <span style=\"margin-right: 8px\">\ud83d\udd17<\/span> Recommended Related Technical Guides:<br \/>\n    <\/h3>\n<ul class=\"cpf-related-list\">\n<li class=\"cpf-related-item\"><a href=\"https:\/\/cpanelfree.com\/blog\/how-to-configure-litespeed-cache-wordpress-100-pagespeed\/\" class=\"cpf-related-link\">How to Configure LiteSpeed Cache for 100\/100 PageSpeed<\/a><\/li>\n<li class=\"cpf-related-item\"><a href=\"https:\/\/cpanelfree.com\/blog\/redis-vs-memcached-wordpress-cache-benchmark\/\" class=\"cpf-related-link\">Redis Object Cache vs Memcached Benchmark<\/a><\/li>\n<li class=\"cpf-related-item\"><a href=\"https:\/\/cpanelfree.com\/blog\/how-to-fix-high-ttfb-wordpress-guide\/\" class=\"cpf-related-link\">How to Fix High TTFB in WordPress (7 Actionable Fixes)<\/a><\/li>\n<li class=\"cpf-related-item\"><a href=\"https:\/\/cpanelfree.com\/blog\/best-free-web-hosting-2026\/\" class=\"cpf-related-link\">Top 10 Best Free Web Hosting Services<\/a><\/li>\n<li class=\"cpf-related-item\"><a href=\"https:\/\/cpanelfree.com\/#plans\" class=\"cpf-related-link\">Explore $0 Free cPanel Web Hosting Plans<\/a><\/li>\n<\/ul>\n<\/div>\n<h2 id=\"step-12\">Frequently Asked Questions<\/h2>\n<div style=\"border-bottom: 1px solid #e2e8f0;padding: 12px 0\">\n<h4>Do older web browsers support AVIF and WebP?<\/h4>\n<p>Over 96% of global browsers support WebP, and over 93% support AVIF. Nginx rewriting ensures legacy browsers automatically receive the original JPEG\/PNG without broken images.<\/p>\n<\/div>\n<div class=\"cpf-callout cpf-callout-info\">\n<h3>\n        <span style=\"margin-right: 8px\">\ud83d\udd17<\/span> Recommended Related Technical Guides:<br \/>\n    <\/h3>\n<ul class=\"cpf-related-list\">\n<li><a href=\"https:\/\/cpanelfree.com\/blog\/how-to-configure-litespeed-cache-wordpress-100-pagespeed\/\" class=\"cpf-overhead-link\">How to Configure LiteSpeed Cache (LSCache) for 100\/100 Google PageSpeed Score<\/a><\/li>\n<li class=\"cpf-related-item\"><a href=\"https:\/\/cpanelfree.com\/blog\/redis-vs-memcached-wordpress-cache-benchmark\/\" class=\"cpf-related-link\">Redis Object Cache vs Memcached: Which is Faster for High-Traffic WordPress?<\/a><\/li>\n<li class=\"cpf-related-item\"><a href=\"https:\/\/cpanelfree.com\/blog\/how-to-fix-high-ttfb-wordpress-guide\/\" class=\"cpf-related-link\">How to Fix High TTFB (Time to First Byte) in WordPress: 7 Actionable Fixes<\/a><\/li>\n<li class=\"cpf-related-item\"><a href=\"https:\/\/cpanelfree.com\/blog\/how-to-install-cloudpanel-ubuntu-24\/\" class=\"cpf-related-link\">How to Install CloudPanel on Ubuntu 24.04: Step-by-Step Guide (2026)<\/a><\/li>\n<li class=\"cpf-related-item\"><a href=\"https:\/\/cpanelfree.com\/#plans\" class=\"cpf-related-link\">Explore $0 Free cPanel Web Hosting Plans (NVMe SSD, AutoSSL)<\/a><\/li>\n<\/ul>\n<\/div>\n<div class=\"cpf-conversion-card\" style=\"background: linear-gradient(135deg, #07193b 0%, #0b2a63 50%, #0f3885 100%) !important; border: 1px solid rgba(56, 189, 248, 0.35) !important; border-radius: 14px !important; padding: 28px 24px !important; margin: 36px 0 !important; text-align: center !important; box-shadow: 0 10px 30px rgba(7, 25, 59, 0.2) !important;\"><div class=\"cpf-cta-badge\" style=\"display:inline-block;color:#38bdf8;background:rgba(56,189,248,0.12);border:1px solid rgba(56,189,248,0.3);padding:4px 14px;border-radius:20px;font-size:11.5px;font-weight:700;text-transform:uppercase;letter-spacing:0.05em;margin-bottom:12px;\">\u26a1 100% Free Lifetime Cloud Hosting<\/div><h3 class=\"cpf-cta-title\" style=\"color:#ffffff;margin:0 0 8px 0;font-size:21px;font-weight:800;letter-spacing:-0.01em;\">Launch Your Website on Genuine cPanel at $0 Cost<\/h3><p class=\"cpf-cta-desc\" style=\"color:#cbd5e1;font-size:14px;line-height:1.6;max-width:580px;margin:0 auto 18px auto;\">Experience unmetered bandwidth, NVMe SSD storage, Softaculous 1-click installer, and authentic cPanel GUI at zero monthly cost. No credit card required \u2014 guaranteed free forever.<\/p><div class=\"cpf-cta-actions\" style=\"display:flex;gap:12px;justify-content:center;flex-wrap:wrap;\"><a href=\"https:\/\/cpanelfree.com\/order\/free\" class=\"cpf-cta-btn\" style=\"display:inline-flex;align-items:center;justify-content:center;background:linear-gradient(135deg,#10b981 0%,#059669 100%) !important;background-color:#10b981 !important;color:#ffffff !important;padding:11px 26px;border-radius:8px;text-decoration:none;font-weight:700;font-size:14px;border:none;box-shadow:0 4px 14px rgba(16,185,129,0.35);\">Claim 100% Free cPanel Now &rarr;<\/a><a href=\"https:\/\/cpanelfree.com\/free-domain\" class=\"cpf-cta-btn\" style=\"display:inline-flex;align-items:center;justify-content:center;background:rgba(255,255,255,0.08) !important;border:1px solid rgba(255,255,255,0.2) !important;color:#ffffff !important;padding:11px 26px;border-radius:8px;text-decoration:none;font-weight:700;font-size:14px;\">Get Free Subdomain (.c0m.in)<\/a><\/div><\/div>\n","protected":false},"excerpt":{"rendered":"<p>Quick Answer: To automatically convert and serve next-gen WebP and AVIF images in WordPress without manual coding, install LiteSpeed Cache (with QUIC.cloud integration) or the free Converter for Media plugin. Enable automatic conversion on upload and configure Nginx \/ .htaccess rewriting to serve WebP\/AVIF dynamically to modern browsers. \u23f1\ufe0f 5 min read (943 words) \ud83d\udee1\ufe0f &#8230; <a title=\"How to Automatically Convert and Serve WebP &amp; AVIF Images in WordPress\" class=\"read-more\" href=\"https:\/\/cpanelfree.com\/blog\/how-to-convert-serve-webp-avif-images-wordpress\/\" aria-label=\"Read more about How to Automatically Convert and Serve WebP &amp; AVIF Images in WordPress\">Read more<\/a><\/p>\n","protected":false},"author":1,"featured_media":2435,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[161],"tags":[],"class_list":["post-1417","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-optimization"],"_links":{"self":[{"href":"https:\/\/cpanelfree.com\/blog\/wp-json\/wp\/v2\/posts\/1417","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/cpanelfree.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/cpanelfree.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/cpanelfree.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/cpanelfree.com\/blog\/wp-json\/wp\/v2\/comments?post=1417"}],"version-history":[{"count":14,"href":"https:\/\/cpanelfree.com\/blog\/wp-json\/wp\/v2\/posts\/1417\/revisions"}],"predecessor-version":[{"id":4237,"href":"https:\/\/cpanelfree.com\/blog\/wp-json\/wp\/v2\/posts\/1417\/revisions\/4237"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/cpanelfree.com\/blog\/wp-json\/wp\/v2\/media\/2435"}],"wp:attachment":[{"href":"https:\/\/cpanelfree.com\/blog\/wp-json\/wp\/v2\/media?parent=1417"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/cpanelfree.com\/blog\/wp-json\/wp\/v2\/categories?post=1417"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/cpanelfree.com\/blog\/wp-json\/wp\/v2\/tags?post=1417"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}