From 1be2f9693164f64d1785f3ec823501b4d55bd385 Mon Sep 17 00:00:00 2001 From: Ross Timson Date: Tue, 26 Mar 2024 21:19:47 +0000 Subject: [PATCH] lisp/ox-html.el: Add avif support for html export inline images * lisp/ox-html.el (org-html-inline-image-rules): Add AVIF image support for inline images on HTML export. AVIF is well supported by browsers these days and offers similar features and much better compression than the other image formats commonly used for the web. TINYCHANGE --- etc/ORG-NEWS | 4 ++++ lisp/ox-html.el | 8 ++++---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/etc/ORG-NEWS b/etc/ORG-NEWS index ca744b932..ee2cdfd16 100644 --- a/etc/ORG-NEWS +++ b/etc/ORG-NEWS @@ -587,6 +587,10 @@ link when storing any type of external link type in an Org file, not just =id:= links. ** New and changed options +*** =.avif= images are not recognized in ~org-html-inline-image-rules~ + +In =ox-html=, =.avif= image links are now inlined by default. + *** New option ~org-beamer-frame-environment~ The new option defines name of an alternative environment to be used diff --git a/lisp/ox-html.el b/lisp/ox-html.el index baca21014..de421ceda 100644 --- a/lisp/ox-html.el +++ b/lisp/ox-html.el @@ -861,15 +861,15 @@ link to the image." :type 'boolean) (defcustom org-html-inline-image-rules - `(("file" . ,(regexp-opt '(".jpeg" ".jpg" ".png" ".gif" ".svg" ".webp"))) - ("http" . ,(regexp-opt '(".jpeg" ".jpg" ".png" ".gif" ".svg" ".webp"))) - ("https" . ,(regexp-opt '(".jpeg" ".jpg" ".png" ".gif" ".svg" ".webp")))) + `(("file" . ,(regexp-opt '(".jpeg" ".jpg" ".png" ".gif" ".svg" ".webp" ".avif"))) + ("http" . ,(regexp-opt '(".jpeg" ".jpg" ".png" ".gif" ".svg" ".webp" ".avif"))) + ("https" . ,(regexp-opt '(".jpeg" ".jpg" ".png" ".gif" ".svg" ".webp" ".avif")))) "Rules characterizing image files that can be inlined into HTML. A rule consists in an association whose key is the type of link to consider, and value is a regexp that will be matched against link's path." :group 'org-export-html - :package-version '(Org . "9.5") + :package-version '(Org . "9.7") :type '(alist :key-type (string :tag "Type") :value-type (regexp :tag "Path")))