If the post image is within the post content, it will send it. However, you can’t embed post image.
Okay, is that a wordpress restriction? Could a post image variable technically exist? Would make the email more beautiful.
Nope, it is not. The post image doesn’t exist in the plugin itself or rather when emailing out the post, it doesn’t fetch the image.
Okay, last try to pose my question “straightly” 😉
Can the plugin be adapted in this way that there will be a new variable that gets the post image out? Or is there a wordpress restriction that doesn’t allow this? Otherwise, I suppose, you would have done this, wouldn’t you?
Nope there is no restriction on WP side. I did not add it because I don’t see a need for it.
Thanks, that’s what I wanted to know.
Maybe I’ll alter the plugin then. I definitely see a need for it: Posts can be recommended in a much nicer way when people also see the post image instead of just having the title with the excerpt or the content (with content images, of course). I even can make a nice HTML template with (of course,) inline CSS, since the Plugin strips out all CSS or header information from the html. Maybe this will increase the click rate on a recommendation mail significantly.
Thanks for your info.
Sounds good! Feel free to fork it https://github.com/lesterchan/wp-email and submit pull request if needed =)
I have adapted the plugin. You now can use two new variables:
- %EMAIL_POST_IMAGE% - %EMAIL_POST_URL%
The first inserts the <img>, the second only the URL of the image.
Additionally, there is a new Dropdown Field for selecting the size of the used post image:
Feel free to check and correct/adapt it if needed, would be good to take this as further basis for updates of the plugin.
You can test it on every article in the beautytipps-blog.
Sent me a pull request for review https://github.com/lesterchan/wp-email =)
Puh, I have no idea what I should do there… never did anything on github…
My files are in the post above if you can handle it…
Sorry I can’t just overwrite it with your files, because I also make some changes and if I do, my changes will be overwritten.
If you are kean in development, you should try/learn to use GitHub. It is tough, but you will appreciate it =)
Here are two articles to help you get started.
I think this post is nearly what I was looking for…but I’d like to know wether the good issue exists for me!
I’m creating a “small ads like” website, and have to find a way to share the custom post content by email (images and custom fields).
Is there a way to get that, adding few lines of code in the wp-email.php?
I don’t know if my question is correct, but thanks for your reply!
- The topic ‘Embed Post_Image in Mail?’ is closed to new replies.