Hi,
Is there any way to attach an inline image once but display it more than once? I'm finding that in some cases i need to use the same image twice in the one email but so far this means I have to attach it twice and thus the size of the email increases.
Is there an (easy?) way to attach it and then link to it as much as i need to? one of the things that was so great for me about swiftmailer was how easy it was to do inline images...
thanks heaps!
Repeating inline images
Moderators: Chris Corbyn, General Moderators
- Chris Corbyn
- Breakbeat Nuttzer
- Posts: 13098
- Joined: Wed Mar 24, 2004 7:57 am
- Location: Melbourne, Australia
Re: Repeating inline images
majiga wrote:Hi,
Is there any way to attach an inline image once but display it more than once? I'm finding that in some cases i need to use the same image twice in the one email but so far this means I have to attach it twice and thus the size of the email increases.
Is there an (easy?) way to attach it and then link to it as much as i need to? one of the things that was so great for me about swiftmailer was how easy it was to do inline images...
thanks heaps!
Code: Select all
$img = $message->attach(new Swift_Message_Image( ... ));
$part = 'Here are two images <img src="' . $img . '" /> and <img src="' . $img . '" />';