Background for overlay image not working
To show a logo as an overlay of a hero image I tried the following in ruby:
hero_image_url = "https://storage.googleapis.com/vinebase-storage/wine-bottle-lifestyle-images/1Z6TJ0IA4GEn4PRejfNW909OQyP_lM8lQ.JPG"
logo_url = "https://storage.googleapis.com/vinebase-storage/winery-logos/1OLahf9sP2fd-ecbQJoRbA79R0NtYq4TZ.png"
base_64_url = Base64.encode64(logo_url).gsub("\n", "")
fetch_image_tag(hero_image_url, transformation: [
{width: 1200,height: 630, crop: :fill},
{overlay: "fetch:#{base_64_url}", width: 300, background: "white", border: "12px_solid_white", radius: 12, color: "white", gravity: "south_west", x: 30, y: 30}]) %>
Everything works fine, except for the background of the overlay, it just does not get applied. Is this just not something that is supported?
0
-
Hi Roland,
Basically, it's using nested layer to allow applying background color of an overlay.
Hope this helps. Let me know if you have any question
1 -
Perfect thanks! I was on the right track looking layer_apply!
0 -
Glad I could help :)
0
Post is closed for comments.
Comments
3 comments