<picture> elements for jxls
This commit is contained in:
parent
0f20753808
commit
84f822f73b
4 changed files with 17 additions and 7 deletions
|
@ -45,7 +45,10 @@ function setImage(id, src, width, height, href, cw, firstLoad) {
|
|||
mainlink.tabIndex = -1;
|
||||
}
|
||||
|
||||
mainimg.src = src;
|
||||
let jxl = src.replace(/\..*?$/, ".jxl");
|
||||
|
||||
mainimg.querySelector('img').src = src;
|
||||
mainimg.querySelector('source').srcset = jxl;
|
||||
mainfig.dataset.width = width;
|
||||
mainfig.dataset.height = height;
|
||||
mainlink.href = href;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue