Remove <picture>s around <img srcset=...>

This commit is contained in:
Anton Khorev 2023-10-03 03:06:12 +03:00
parent 95041ec81a
commit 0fae5627a5
5 changed files with 9 additions and 62 deletions

View file

@ -25,9 +25,7 @@ module UserRolesHelper
end
if image
svg_icon = tag.source(:srcset => image_path("#{image}.svg"), :type => "image/svg+xml")
png_icon = image_tag("#{image}.png", :srcset => image_path("#{image}.svg"), :size => "20x20", :border => 0, :alt => alt, :title => title)
icon = tag.picture(svg_icon + png_icon)
icon = image_tag("#{image}.png", :srcset => image_path("#{image}.svg"), :size => "20x20", :border => 0, :alt => alt, :title => title)
icon = link_to(icon, url, :method => :post, :data => { :confirm => confirm }) if url
end