lib/img_props.rb in jekyll_img-0.2.1 vs lib/img_props.rb in jekyll_img-0.2.2
- old
+ new
@@ -64,9 +64,15 @@
@alt ||= @caption || @title
@title ||= @caption || @alt
end
+ def src_any(filetype)
+ raise Jekyll::ImgError, "The 'src' parameter was not specified" if @src.to_s.empty?
+
+ @src.gsub('.webp', ".#{filetype}")
+ end
+
def src_png
raise Jekyll::ImgError, "The 'src' parameter was not specified" if @src.to_s.empty?
@src.gsub('.webp', '.png')
end