We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I am wondering if anyone have come across embedding images into twig using this bundle.
At the moment this doesnt work: <img src="{{ asset('bundles/devtools/images/background.jpg') }}">
<img src="{{ asset('bundles/devtools/images/background.jpg') }}">
But this works: Controller: $img1 = $message->embed(\Swift_Image::fromPath('/path/DevToolsBundle/Resources/public/images/background.jpg'));
$img1 = $message->embed(\Swift_Image::fromPath('/path/DevToolsBundle/Resources/public/images/background.jpg'));
Twig: <img src="{{ img1 }}">
<img src="{{ img1 }}">
Is there any better approach for that?
The text was updated successfully, but these errors were encountered:
You should be able to use:
<img src="{{ absolute_url(asset('bundles/devtools/images/background.jpg')) }}">
Although, if you are sending the e-Mails from Command Line, you have to adjust your configuration slightly: http://symfony.com/doc/current/console/request_context.html
Sorry, something went wrong.
No branches or pull requests
I am wondering if anyone have come across embedding images into twig using this bundle.
At the moment this doesnt work:
<img src="{{ asset('bundles/devtools/images/background.jpg') }}">
But this works:
Controller:
$img1 = $message->embed(\Swift_Image::fromPath('/path/DevToolsBundle/Resources/public/images/background.jpg'));
Twig:
<img src="{{ img1 }}">
Is there any better approach for that?
The text was updated successfully, but these errors were encountered: