WordPress.org

Ready to get started?Download WordPress

Forums

Jetpack by WordPress.com
Post by Email - Controlling Images (13 posts)

  1. Gary-n-Galax
    Member
    Posted 1 year ago #

    Has anyone found ways to gain more control of images created when using the Post by Email feature? Ideally, when posting by email, I want my images to appear at the top, floated right, with a margin, and set at a medium size. As is Post by Email only posts at the bottom, inline, and maximized to 1024x1024.

    Any easy fixes that would help with any one of those elements? For instance, I am now controlling the size of images delivered by Post by Email with the "Resize at Upload Plus" plugin.

    http://furryfriendsvetclinic.nwsltr.info/

    http://wordpress.org/extend/plugins/jetpack/

  2. Gary-n-Galax
    Member
    Posted 1 year ago #

    Forgot to mention, I also installed 'Easy Add Thumbnail' which will automatically take images attached in Post by Email and use them as the featured image.

  3. Jeremy Herve
    Happiness Engineer
    Plugin Author

    Posted 1 year ago #

    We're aware of this issue, and we're working on a fix. I'll post again here as soon as this problem is solved.

  4. Gary-n-Galax
    Member
    Posted 1 year ago #

    Thank you Jeremy and the whole team for all your hard work on JetPack. In the meantime, does anyone know of plugins such as the two mentioned above that further help with image control when posting by email?

  5. Jeremy Herve
    Happiness Engineer
    Plugin Author

    Posted 1 year ago #

    does anyone know of plugins such as the two mentioned above that further help with image control when posting by email?

    Did you try enabling Jetpack's Photon module? It might help you by changing the width of the images to fit the required width.

  6. Gary-n-Galax
    Member
    Posted 1 year ago #

    Jeremy, I did enable Photon after reading similar comments elsewhere, but it had no effect on my image size. Thanks for the idea. I am given to understand that if I learn some querry code and hack my theme, I could then use Photon to definitely resize the images being served out of cache. However, for the current project, I am really trying to avoid any coding that will complicate updates or make it hard for the HTML-only members of my team to replicate the set up. As is, the 'Resize at Upload Plus' plugin helps with the resizing issue and enables my team to make settings through a GUI. The only drawback of that plugin is that I am making images a little larger than I would like for post pages so that they will look good when SNAPed over to Facebook. I'm guessing that I probably need to learn how to hack and modify my theme for my specific ideas and then only update the theme when absolutely necessary.

  7. WebBadAss
    Member
    Posted 9 months ago #

    I am going to put this here too - But before I do I also wanted to thank Jeremy and the team for all the jetpack goodness they have created...

    AND my problem is described below but i just thought up an interim solution for it. It is likely a complicated process to add so much more image placement control to post by email so would it be easier and possible to remove what is there? I mean the heart of the problem is that it is posting ALL images as 1024x1024 regarless of original size and aspect ratio.

    What is happening is that ALL IMAGES sent through jetpacks post-by-email function are sized to a height and width of 1024x1024. Period - i have tried this on multiple installs on multiple domains with multiple versions but have been having the problem with every one. I have tried to edit every possible setting with 1024 as a parameter but i cannot find where that parameter is defined.

    So has anyone been able to adjust or fix this in any way besides just resizing the image to be correct after the fact?

  8. Jeremy Herve
    Happiness Engineer
    Plugin Author

    Posted 9 months ago #

    So has anyone been able to adjust or fix this in any way besides just resizing the image to be correct after the fact?

    We're still working on a fix. But I'll post here as soon as we have some news!

  9. Gary-n-Galax
    Member
    Posted 9 months ago #

    So has anyone been able to adjust or fix this in any way besides just resizing the image to be correct after the fact?

    Yes. The free plugin Resize at Upload Plus can let you choose a different size for all your incoming images. Just remember to turn it off when you are working with the layout directly and turn it back on when you go back to email updates.

  10. samteeeee
    Member
    Posted 5 months ago #

    Hi guys, you can fix this by inserting the following code into your functions.php

    add_filter( 'post_thumbnail_html', 'remove_width_attribute', 10 );
    add_filter( 'image_send_to_editor', 'remove_width_attribute', 10 );
    
    function remove_width_attribute( $html ) {
       $html = preg_replace( '/(width|height)="\d*"\s/', "", $html );
       return $html;
    }

    As described here: http://css-tricks.com/snippets/wordpress/remove-width-and-height-attributes-from-inserted-images/

    HTH
    Sam

  11. WebBadAss
    Member
    Posted 5 months ago #

    Samteeeee,

    Wow thanks! And I do mean that as it is now useable again... And now i am gonna get sarcastic (Not about your contribution, you did good, but about the problem itself)...

    Why is this still broke 8 months after its identified and the only good fix we have is from the community stripping out all image sizing and handling that was so carefully crafted into WP and JP? And its a simple post!?!

    I describe it to my clients as "subject for subject, image for image and body for body" and it could be that simple.. I don't want captions or complicated html and css - i want to send a photo from a mobile device and have it simply posted - NO formatting required - but preferably with sizing the image to the defined size in WP. Boop. Thats all everyone is looking for...

    Thanks again for the fix Samteeeee. And if i come across another i will come back here and make some more smart alex remarks and let you all know...

  12. Jeremy Herve
    Happiness Engineer
    Plugin Author

    Posted 5 months ago #

    Why is this still broke 8 months after its identified and the only good fix we have is from the community stripping out all image sizing and handling that was so carefully crafted into WP and JP?

    As you mentioned, @samteeeee's trick is perfect when you can afford removing size attributes from all your post images. It comes with a price, though, as you mentioned and as mentioned in the comments of the post on CSSTricks: depending on your theme, and depending on the other elements you may add to your images (like captions), you may end up breaking things, even for previous posts where you didn't use Jetpack's Post By Email feature.

    We'd like to release a fix that will work for everyone, without breaking any other features on your site. Once we've managed to figure this out, we'll post again here to let you know!

  13. WebBadAss
    Member
    Posted 3 months ago #

    I keep running into this problem - it really should be something fixed on the WordPress or JetPack end but apparently not. So I found a theme that works fine and tore it apart to find out why. It works fine with no edit of the functions.php file or any of the code - all I had to do was add this piece of css to the style.css file...

    /* Images - added to prevent image skewing during post by email */
    .entry-content img,
    .comment-content img,
    .widget img {
        max-width: 97.5%; /* Fluid images for posts, comments, and widgets */
    }
    img[class*="align"],
    img[class*="wp-image-"] {
        height: auto; /* Make sure images with WordPress-added height and width >attributes are scaled correctly */
    }
    img.size-full {
        max-width: 97.5%;
        width: auto; /* Prevent stretching of full-size images with height and >>width attributes in IE8 */
    }

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic