Try this code
$crop = array( 'center', 'center' );
$resize_img->resize( $wpc_image_width, $wpc_image_height, $crop);
Related Posts:
- Cropping, Re-sizing and Saving images from one folder to another folder in wordpress
- how to embed a crop feature for cropping images uploaded by the user
- wp.media.view.ImageDetails – Save settings as HTML5 data-* attributes for image
- how to get path to images in the uploads folder to be used in a plugin
- Display (and manage) webcam images?
- Automatically Import Image into Posts from URLs on the Web?
- How can I attach images to a post from the media library?
- How do I change the description of the same image which is to be found in multiple instances?
- How to select featured images for 1500 posts?
- Rename existing old uploaded images containing accented French characters (not during upload)
- Thumbnail with different sizes
- How to extract images of post and pages excluding header and logo image in wordpress?
- Disabling post images for not logged in users
- How to upload thousands of images?
- Generated Images sizes do not match Media Settings Image Size
- Converting a simple plugin to be placed inside of functions.php
- How to get CMB2 to show a single image at a specific size
- How to limit 1 image per post on homepage only?
- Flickr plugin that will display photos from multiple group pools? [closed]
- Getting media library popup in custom plugin admin page
- How to change ID of an attachment in wp_posts and its related tables correctly?
- How do I create a full-bleed background image on text mouseover? [closed]
- bulk change of image setting “link to” to “link to: image url “
- Regenerate images with automatic ALT and TITLE attributes
- Get the url of the full sized attachment image using post ID?
- Adding Attachment Display Settings in custom media frame
- Find unused images?
- Image gallery plugin [closed]
- Inserting HTML tag with ACF into shortcode
- Images not showing after changing wp-content folder name
- How can I implement an Add to Collection function on my Image Gallery to be downloaded later?
- How to Delete all Unused photos Function
- How can I restrict image upload dimensions for non-admin WordPress users?
- wp_generate_attachment_metadata is creating an empty array
- Load external images via proxy
- Add padding while generating thumbnail
- Can we have an ‘Update metadata’ button in Image Gallery for all image instances?
- Add ALT attribute to Pin It Button image to pass HTML5 validation
- Adding (image) caching to my Tumblr widget
- Image Manager Plugin [closed]
- Redirect to another page using contact form 7? [closed]
- Adding Static Image to WooCommerce Content-Single-Product template
- In Woocommerce theme need to add custom external link [closed]
- Photo Gallery Plugin and Touch Devices
- How to limit image size for the entire website ? But without editing the post (css/plugin?!)
- Skewed / slanted button within elementor [closed]
- How can I automatically download all images from all imported posts, place them on my new host, and replace all the links
- Plugin for an interactive image? [closed]
- How to fix broken media library?
- How to accept images at multiple sizes and aspect ratios and display as standardized image size / ratio?
- Add “Featured Image” box in my plugin post page
- Blurry images when loading the page first time
- Image Galleries for website migrated from .com to .org
- JSON API Plugin not showing Attachments id reused
- Woocommerce: Set thumbnail detail (clipping area)
- Some images on WordPress site are suddenly gone
- Regenerate Thumbnails Plugin successfully updated my thumbnails but image src won’t change to new image size?
- Multiple images per post – Show random image elsewhere
- Replace image urls(absolute instead of relative) by using filter in single page
- Looking for a photo management solution
- Simple sildeshow/image-upload plugin?
- Elementor Pro display featured image on section -> style -> image using shortcode
- Can export gallery but can’t import it Wp all import
- how to remove share button from image overlay
- How to hide featured images of all posts falling under the same category in wordpress?
- Upload Image with a file URL and show dynamically on Frontend
- Is classical wordpress eidtor a good option for me to include a large table with a large number of images on my webpage?
- insert og image link in wordpress post
- Optimise wordpress database using SQL after deleting registered images from Media Folder
- Display Multiple Photos as Featured Image when mouse moves on to it post
- How to Upload images to a custom folder in upload folder using media uploader
- what functions to use to resize images and create DB metadata for them after/during upload?
- Product Page loads terribly slow when product gallery images are added
- WordPress how do I change images used in plugins?
- Help finding a plugin – masonry type post grid
- How to wrap image tag into div for post only?
- Insert Sponsor logo in custom own theme
- Does WordPress have a way of changing the ‘Natural’ size of uploaded images?
- Optimize and delete images in WordPress
- Upload image to wordpress using ionic/cordova with WP REST API V2
- Add image to post
- resizes images on the fly
- Theme Load Error
- how to open image gallery in a post/page?
- How to select featured images for 1500 posts?
- Server Path Information
- Determine if get_the_image has image on Get the image Plugin
- Display alt text as tool tip on page
- Adding Relevant Post Images
- Image Layout in Posts
- How can I manage the background image of a slider based on the featured image of a page?
- getting image alt text via ACF plugin in WordPress [closed]
- Allow users to download media files directly from Amazon S3 (AWS plugin)
- How should I force WordPress to give proper name for the uploading images?
- How to display multiple images in the before and after plugin?
- How to Add a Website Background Image to One Page?
- Want to show pop up image on home page every time when i refresh it [closed]
- Achieve the following layout
- How To Convert External Image URLs To Own Website’s Uploaded Images Automatically?
- How do i display the number of images on the “post screen”