문제

Has anyone found ways to gain more control of images created when using the Wordpress Jetpack "Post by Email" feature?

Ideally, when posting by email, I want my images to appear the same size as those attached to the email. As is Post by Email only posts them maximized to 1024x1024.

도움이 되었습니까?

해결책

You can fix this by inserting the following code into your functions.php

add_filter( 'post_thumbnail_html', 'remove_width_attribute', 10 );
add_filter( 'the_content', '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/

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top