diff --git a/lib/jekyll-seo-tag/json_ld_drop.rb b/lib/jekyll-seo-tag/json_ld_drop.rb index d51404f..8f88879 100644 --- a/lib/jekyll-seo-tag/json_ld_drop.rb +++ b/lib/jekyll-seo-tag/json_ld_drop.rb @@ -59,6 +59,15 @@ module Jekyll hash = page_drop.image.to_h hash["url"] = hash.delete("path") hash["@type"] = "imageObject" + + if hash["alt"] && !hash["description"] + hash["description"] = hash["alt"] + end + + if hash["alt"] + hash.delete("alt") + end + hash end