Page 1 of 1

Repeating inline images

Posted: Mon Jul 02, 2007 6:24 am
by majiga
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!

Re: Repeating inline images

Posted: Mon Jul 02, 2007 8:31 am
by Chris Corbyn
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 . '" />';