Search code examples
ruby-on-railstemplatesmailer

Rails add image to email template


I want to add images or swag to email template, Any idea for this bug

Sample :

<%= image_tag(asset_url('logo_grimaud.png')) %>

Solution

  • %div{:style => "background-image: url(#{ENV['IMAGE_URL']}/home.jpg);background-repeat: repeat;"}
    

    This is how we did in one of our app. our images are already hosted on our severes. So ENV['IMAGE_URL'] will be the app location where you have hosted your app.