• Resolved jx25

    (@jx25)


    Can images that are attached via Post By Email be set as feature images? We are using the Dyad theme, and we want to Post By Email with Jetpack, but when we attach an image in the email, the image publishes to the bottom of the post. Is there any way to make it publish as the feature image instead?

    Is there a workaround?

    Is there a way to at least make the image not so big and dominant on the bottom, and perhaps embed it in the content as a small thumbnail a bit farther up?

    https://www.ads-software.com/plugins/jetpack/

Viewing 8 replies - 1 through 8 (of 8 total)
  • Thread Starter jx25

    (@jx25)

    We’re using a plugin that helps – it assigns the attached image as the featured image.

    However, the attached image show up again at the bottom of the post, as an inline image. Is there a way to do any of the following?:

    1. Get rid of the inline image altogether
    2. Reduce the size of the inline image to a very small thumbnail, embedded at the top/right of the post

    Preferably #1?

    It’s just that the image is so huge, redundant/unnecessary when your theme has a huge feature image already!

    Thanks!

    Plugin Author Jeremy Herve

    (@jeherve)

    Jetpack Mechanic ??

    While Jetpack doesn’t offer that option, you could automatically remove featured images from the post content by filtering the_content in a separate plugin.

    I haven’t tested it, but something like this could work:

    /**
     * Remove Featured Image from the post content.
     *
     * @see https://www.ads-software.com/support/topic/2930158
     */
    function jeherve_rm_featured_content( $content ) {
    	// Let's get info about the featured image first.
    	$post_thumbnail = wp_get_attachment_image_src( get_post_thumbnail_id() );
    
    	// Let's build a pattern: our image, in an image tag
    	$image = sprintf(
    		'!<img.*?src="%s".*?/>!i',
    		$post_thumbnail[0]
    	);
    
    	// Remove the image from the post content.
    	$content = preg_replace( $image, '', $content );
    
    	return $content;
    }
    add_filter( 'the_content', 'jeherve_rm_featured_content' );
    Thread Starter jx25

    (@jx25)

    Thanks very much! I’m not a coder at all, so my layperson eyes sees symbols.

    Could you tell me if I can copy & paste this somewhere?

    I didn’t quite catch what filtering the_content in a separate plugin means.

      What’s the name of the plugin?
      Do I find/activate the plugin, then paste this code in it?
      If so, where?

    Thanks a lot.

    Thread Starter jx25

    (@jx25)

    Alright, got the answer, thanks!

    Plugin Author Jeremy Herve

    (@jeherve)

    Jetpack Mechanic ??

    Glad to hear you’re all set!

    In general, it’s best to use functionality plugins for all snippets you need to add to an existing site. This plugin is usually a good start:
    https://www.ads-software.com/plugins/code-snippets/

    Dear jx25 – I have the same requirement.

    Can you please help?
    1. Which plugin did you use to set the featured image in post by email.
    2. How did you get rid of the pic from the post body?

    Regards,
    Raju.

    whats the name of the plugin that will set image to feature images

    Plugin Author Jeremy Herve

    (@jeherve)

    Jetpack Mechanic ??

    whats the name of the plugin that will set image to feature images

    I haven’t tested it, but it looks like this plugin is what you’re looking for:
    https://www.ads-software.com/plugins/wp-auto-featured-image/

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Can images in Post By Email be set as feature images?’ is closed to new replies.