So I am having a twig/timber
issue where I have a difficult time getting a placeimage set, here is what I have so far:
{% set defaultimg = site.theme.link ~ '/images/placeimage.png' %}
and then later in my code I have:
<img src="{{ post.thumbnail.src | default(defaultimg) | resize(360, 240)}}" class="card-img-top">
post.thumbnail.src pulls in the images just fine but if no featured Img in attached to the post I want the defaultimg
to pull in an image from my custom themes image folder. But currently this is outputting a really erroneous url of:
<img src="https://toolcart.local/wp-contentC:\Users\User\Local Sites\toolcart\app\public\wp-content\themes\toolcart-theme\images/placeimage-360x240-c-default.png" class="card-img-top">
However a {{defaultimg}}
outputs the image url correctly.
https://toolcart.local/wp-content/themes/toolcart-theme/images/placeimage.png
I am not sure what to try next?
| resize(360, 240)
just totally messes up the url to the default image such as this example here: ImageLink would you happen to have any thoughts on why this would happen? – Homoousian