WordPress.org

Ready to get started?Download WordPress

Forums

WP-EMail
[resolved] Embed Post_Image in Mail? (14 posts)

  1. Al Bee
    Member
    Posted 7 months ago #

    I can embed the Post_Title - but how to embed the post_image? Should be another variable, shouldn't it?

    https://wordpress.org/plugins/wp-email/

  2. Lester Chan
    Member
    Plugin Author

    Posted 7 months ago #

    If the post image is within the post content, it will send it. However, you can't embed post image.

  3. Al Bee
    Member
    Posted 7 months ago #

    Okay, is that a wordpress restriction? Could a post image variable technically exist? Would make the email more beautiful.

  4. Lester Chan
    Member
    Plugin Author

    Posted 7 months ago #

    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.

  5. Al Bee
    Member
    Posted 7 months ago #

    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?

  6. Lester Chan
    Member
    Plugin Author

    Posted 7 months ago #

    Nope there is no restriction on WP side. I did not add it because I don't see a need for it.

  7. Al Bee
    Member
    Posted 7 months ago #

    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.

  8. Lester Chan
    Member
    Plugin Author

    Posted 7 months ago #

    Sounds good! Feel free to fork it https://github.com/lesterchan/wp-email and submit pull request if needed =)

  9. Al Bee
    Member
    Posted 7 months ago #

    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:

    Screenshot

    Feel free to check and correct/adapt it if needed, would be good to take this as further basis for updates of the plugin.

    Download the plugin with Image variable

    You can test it on every article in the beautytipps-blog.

  10. Al Bee
    Member
    Posted 5 months ago #

    Lester, can you integrate my changes in your plugin?

  11. Lester Chan
    Member
    Plugin Author

    Posted 5 months ago #

    Sent me a pull request for review https://github.com/lesterchan/wp-email =)

  12. Al Bee
    Member
    Posted 5 months ago #

    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...

  13. Lester Chan
    Member
    Plugin Author

    Posted 5 months ago #

    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.

    https://help.github.com/articles/fork-a-repo
    https://help.github.com/articles/using-pull-requests

  14. manuplus
    Member
    Posted 2 months ago #

    Hi guys,
    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!

Reply

You must log in to post.

About this Plugin

About this Topic

Tags

No tags yet.