crop uploaded image in wordpress without plugin

how to crop uploaded image in wordpress without plugin

Many people use the scaled image for thumbnail image. Instead of that croping image the proper size and showing that is nice. Crop Uploaded image without plugin is supported by wordpress itself so do not use any third-party plugin for this.

crop uploaded image in wordpress

You can use the following code in your functions.php file:

// Standard Size Thumbnail
if(false === get_option("thumbnail_crop")) {
 add_option("thumbnail_crop", "1"); }
 else {
 update_option("thumbnail_crop", "1");
 }

// Medium Size Thumbnail
if(false === get_option("medium_crop")) {
 add_option("medium_crop", "1"); }
 else {
 update_option("medium_crop", "1");
 }

// Large Size Thumbnail
if(false === get_option("large_crop")) {
 add_option("large_crop", "1"); }
 else {
 update_option("large_crop", "1");
 }
crop uploaded image in wordpress without plugin
crop uploaded image in wordpress without plugin

Published by

Purab

I am Purab from India, Software development is my profession and teaching is my passion. Programmers blog dedicated to the JAVA, Python, PHP, DevOps and Opensource Frameworks. Purab's Github Repo Youtube Chanel Video Tutorials Connect to on LinkedIn

One thought on “how to crop uploaded image in wordpress without plugin”

Leave a Reply to Lavonda Umeh Cancel reply

Your email address will not be published.