How to insert 4K images in your WordPress posts

Last updated on June 29, 2020 The Shadow Loading... Post a comment

After editing your php.ini file (some stuff similar to upload_max_filesize = 100M), you can upload big images but still can not insert them into your posts.

Even if you select Full Size from the image size option on the right sidebar of your Gutenberg editor, it seems not working.

For example, you try to embed a 4K image (3840 x 2160) to your post but it automatically scales to 2560 x 1440 (sorry, I don’t remember exactly the height, but the width is absolutely 2560). This is not an error but a feature of WordPress that intends to help speed up your site. However, sometimes we don’t need this feature, i.e. when we have a wallpapers website.


Just add the code below into somewhere in your theme functions.php:

add_filter('big_image_size_threshold', '__return_false');

Simple as that 🙂

Notify of
Inline Feedbacks
View all comments

Related Articles