-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Images at PDF format invoice #1189
Conversation
<a href="{{ path('sylius_product_show', {'slug': product.slug}) }}" class="thumbnail pull-left" style="margin-right: 15px;"> | ||
<img src="{{ product.image ? product.image.path|imagine_filter('sylius_90x60') : 'http://placehold.it/90x60' }}" alt="{{ product.name }}" /> | ||
<img src="{{ image }}" alt="{{ product.name }}" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is wrong. You should just call it:
{{ product.image ? product.image.path|imagine_filter('sylius_90x60', true) : 'http://placehold.it/90x60' }}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
His point is to have the full URL in the src
attribute, so that the PDF transformation finds the image.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@winzou If you check diff and documentation you will see the "magic" true
parameter with which the imagine_filter
will generate absolute path to image.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't see your true
argument. This is indeed better but your previous comment could have been clearer :)
I didn't know that parameter. Thanks @stloyd. |
Images at PDF format invoice
Thank you Jorge! |
Great! :)
|
Images are not showed at invoices with pdf format.