1
votes

Inside Admin panel when we upload image for a specific post that image has default size medium(300 X 300). Instead of changing it every time from Add Media > ATTACHMENT DISPLAY SETTINGS while inserting into post or from Edit > Image Details >DISPLAY SETTINGS after inserting into post. How can we set the default image size to full/ original size or if it's full size then to medium/ thumbnail.

The main thing is to change the default image size setting. How do I do it?

1
Did you want to full image display on front-end post?Purvik Dhorajiya
yes but without changing it every time from ATTACHMENT DISPLAY SETTINGS & DISPLAY SETTINGS as mentioned in the question.Yash Sharma
the_post_thumbnail('full'); have you try this function to display post image ?Purvik Dhorajiya

1 Answers

1
votes
function custom_image_size() {
    //set default for image size
    update_option('image_default_size', 'full' );
}
add_action('after_setup_theme', 'custom_image_size');

or simply

update_option('image_default_size', 'full' );

https://wordpress.stackexchange.com/questions/226915/how-to-set-the-default-embed-image-size