Skip to content

Commit

Permalink
Merge pull request #46 from borisschapira/support-loading
Browse files Browse the repository at this point in the history
Support `loading` as an inline attribute for cloudinary tag (fix #45)
  • Loading branch information
nhoizey authored Apr 9, 2019
2 parents b487e01 + 2554f23 commit 72d4e6e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/jekyll/cloudinary.rb
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,10 @@ def render(context)
img_attr << " title=\"#{html_attr["title"]}\""
html_attr.delete("title")
end
if html_attr["loading"]
img_attr << " loading=\"#{html_attr["loading"]}\""
html_attr.delete("loading")
end

attr_string = html_attr.map { |a, v| "#{a}=\"#{v}\"" }.join(" ")

Expand Down

0 comments on commit 72d4e6e

Please sign in to comment.