Whenever I upload a large image, it gets resized to the width of the post. This will be a negative feature for comic reading sites. I need to display the full width images, which I can resize when I need during upload.
If anything that can fix this issue?
To disable resizing for all image sizes without manually removing each size with
remove_image_size
function, use the filterintermediate_image_sizes_advanced
WordPress resizes its images into 3 default sizes:
And in all the three cases WordPress simply crop them from middle by default, and make their different versions for different use cases. It’s done to ensure speed.
When we call a featured image in somewhere we simply call the size inside the function like:
Okay, now the good news is, though WordPress resizes all the uploaded images, it keeps the original one intact, and we can use the original one too, wherever necessary. To use the original file, you just need to call:
So, the problem is now on your theme file. You need to modify the theme file to change the code into something like this.
Disabling resizes
From admin panel
Though it’s not related for your cause, but to stop those auto resizing, follow the simple steps:
/wp-admin
from Settings » MediaLarge
,Medium
andThumbnail
sizes, simply put zero (0
) into their width and height.It’ll stop those resizes from the future uploads. 🙂
Using code
You can use
remove_image_size()
function into yourfunctions.php
to disable all the three default image sizes:It will stop resizing the images into those sizes.
Reference
the_post_thumbnail()
– Codex