d937afc208
todo: fix gif
9 lines
254 B
Lua
9 lines
254 B
Lua
-- img-to-webp.lua
|
|
function Image(el)
|
|
local fileext = el.src:match("%.[^%.]+$");
|
|
-- DEBUG -- print("LUA IMG: ", fileext);
|
|
if ( fileext == ".jpg" or fileext == ".png" or fileext == ".jpeg" ) then
|
|
el.src = el.src .. ".webp"
|
|
end
|
|
return el
|
|
end
|