1

I'm trying to setup a page where the html will be copied into Mailchimp for a newsletter. The images need to have a full path url. How would I construct the code to provide this? So instead of "/images/something.jpg" it would be "http://domain.com/images/something.jpg".

{% set imageTransform = { width: 520, height: 240 } %}
{% for image in entry.headerPhoto %} 
 <img src="{{ image.getUrl(imageTransform) }}"  alt="{{ entry.title }}" style="display:block;" >   
{% endfor %} 

If there is text inside rich text fields is there any way to output the full url to those images too?

1
  • 1
    Do your images currently not have a full url? Normal output should provide a full url. Are you using a local source or a third party source for you images like AmazonS3? If you setup your assets source in the CP (Settings > Assets > Sources) you can set the URL Prefix which should prefix all your asset urls.
    – a-am
    Oct 28, 2015 at 18:08

1 Answer 1

2

Changing the Settings > Assets > Sources url fixed the problem globally. Thanks for the help, aran.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.