Support » Plugin: Postie » [Plugin: Postie] Image template and inline images not working

  • Resolved grimpond


    WordPress 3.12
    Postie 1.4.2
    PHP Version : 5.2.12-2

    Postie is working perfectly in most aspects, and the plugin is perfect for our needs, but we can not get the custom image template to work, nor the inline images(#img1# etc)

    Posts are posted and the image are added as what appears to be the default WP gallery

    Am I missing something?
    Any help appreciated


Viewing 8 replies - 1 through 8 (of 8 total)
  • mattleech


    Hi Grimpond,

    I’ve been having problems with postie and multiple images, are your symptoms the same as mine posted here:

    If so then I have a fix for you.

    Hey matt,

    Similar but not the same.. all images for me end up in a ‘gallery’ at the end of the post, and I end up with #imgX# stuck through the post.

    My biggest frustration is the none of the standard image templates work when selected, and consequently the custom fails as well.

    If you think the ‘fix’ might help, I would be happy to see it 🙂


    Hi Grimpond,

    I’ve posted a quick guide here:

    Please backup your existing ReplaceImagePlaceHolders function before overwriting it.

    Good luck!


    I tried your code after looking everywhere and trying every fix I could find for multiple image attachment problem in postie. Even with a fresh install of WP and Postie, everything works fine except when i add more than one image to an email, it will not post.

    The issue i have with your code is once i replace the original with yours I get an error at line 1823 $value = '[gallery]'; and tells me there is wrong syntax. Iv tried several times making sure i was only replacing the code i was supposed to and i always get that error at that line. Is there something Im missing?


    @3rdaxis, that’s very strange as my modifications are all after that point in the processing. Here’s my entire ReplaceImagePlaceHolders function for you to copy and paste, let me know if you still have the problem after trying this:

    [Code moderated as per the Forum Rules. Please use the pastebin]

    @mattleech thanks for the quick reply. This time around though im getting this error Parse error: syntax error, unexpected T_STRING, expecting T_VARIABLE in /home/content/w/i/l/wildcatfan42/html/wordpress/wp-content/plugins/postie/postie-functions.php on line 1819

    Its halting from the first line of the modified code. function ReplaceImagePlaceHolders(&$content,$attachments, $config) {

    Is there a specific template your using for the images?


    @mattleech I found a solution to the multiple image problem. Under settings > Media I set the Large size way up and now there is no issue with the original postie code. After not being able to use your code, i started to think about what would cause it to fail and sent a bunch of very small pictures which all posted just fine, so it was not the number of pics, So I figured it must be the size.

    Thanks for your help though. Messing with your code is what got me thinking on the solution to my problem.

    @3rdaxis, I usually find that “Parse error: syntax error, unexpected T_STRING, expecting T_VARIABLE” is caused by a missing ;

    I remember thinking that the problem could be related to file size but I found that sometimes the small images would fail too. Then I ran tests for image dimensions but those results were also inconsistent.

    I hope that keeping the file sizes small continues to work. Let me know if the problem arises again.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘[Plugin: Postie] Image template and inline images not working’ is closed to new replies.