You can use the single_product_archive_thumbnail_size
filter to change which image size is used for a particular product:
function wpse_287488_product_thumbnail_size( $size ) {
global $product;
if ( $product->get_id() === 123 ) {
$size="medium";
}
return $size;
}
add_filter( 'single_product_archive_thumbnail_size', 'wpse_287488_product_thumbnail_size' );
Just replace medium
with the registered image size you want to use. See this codex article for an overview of image sizes and how to register your own.
Related Posts:
- How to change image type for specific size?
- Mixed content warnings after changing site adress from HTTP to HTTPS
- add_image_size() zoom-crop
- Insert an image into a post by API
- Which are precisely the predefined image sizes?
- Adjust image caption within visal editor
- Change Image URL to a CDN
- Slider image issue in wordpress
- Responsive Images – Add srcset attributes to custom Images Function
- Getting custom size image URL
- Retrieving images from a NextGEN gallery
- Loss of sharpness in jpg imported as header in twentyeleven
- Getting alt text of featured image
- Get image alt attribute just by image URL
- Can I the caption shortcode to set caption to a data attribute, and with the image’s alignment intact?
- How to resolve – IE 6 ignores img “width” properties
- WordPress is stripping the Alt tag’s quote marks from images where Alt is not set, but leaving the word ‘alt’ creating problems for ADA compliance
- WordPress reduces the full size image and uses it as the original
- Show taxonomy list with taxonomy images ( SOLVED)
- get_children() not working properly – Only on one post?
- get the image of the post
- Is There A Way Of Using the_post_thumbnail() to Pull In A Specific Image From The Media Library
- Update image links in database
- ACF Image ID, echo the alt tag
- Change WordPress Media Manager
- How to stop images from being wrapped in tags?
- Output random (custom) image size
- WordPress crops images differently on retina screens?
- Upload media files to Amazon S3
- Out of memory error reporting
- How do I create an alternate RSS feed for tags with custom image sizes for MailChimp?
- Remove the inline styling added in wp_get_attachment_image()
- Image not shown in the theme as it’s showing in HTML template [closed]
- Broken image links even though links are correct and images exist
- Move Image Captions Inside Link ( tag) if Added
- Sharing images to social media – issue with aspect ratio
- How to add an image to a custom url?
- Get image from parent category
- Images attached to posts from library link to 404 error page
- Images not displayed when moving site to local
- Caption and title in img alt tag are the same?
- fetch images and videos
- Facebook og:image issues after https change [closed]
- Does WP create multiple images?
- How to use Facebox in WordPress theme?
- Mass crop images: Landscape images -> Portrait images
- Change image name during uploading sequentially
- Getting thumbnail of uploaded image
- Display image for first sticky post only
- Get all image IDs from the Media Library
- How to redirect homepage to actual URL?
- Can’t add image to site via php
- Cropped image file size larger than original, is it normal?
- What is required in the hosting environment for WordPress to process an image into multiple sizes?
- Get an image from url, resize it, and save on a custom folder (not the media library)
- Get all custom sizes in srcset attribute
- Why isn’t add_image_size(‘event-secondary-image-thumbnail’, 250, 150) working?
- Images dont show up on an iPhone [closed]
- Moving an image to the side [closed]
- How to add thumbnails to posts and pages automatically in a uniformed fixed elegant way?
- How do I implement an image viewer and rotator? [closed]
- Is it possible to modify default image name suffix?
- How to replace post image url before posting using api?
- image upload/edit is broken: “Image data does not exist. Please re-upload the image.”
- Background Image Does Not Display on Page
- Can’t fix corrupted images
- How can we upload common images only to AWS S3 using WordPress?
- Deleted Image giving a 301
- Avatar picture is broken
- WordPress append -1 to the image name
- wpdb function for filtering the images by title
- Link to products with the same image title (woocommerce)
- WordPress Single Post image gallery as slider
- WordPress does not load most theme images
- There is an image embedded on my page that I can’t locate in order to delete. Please help me!
- Could creation of various image sizes cause slow form submission response?
- convert images and media url into blob url
- How to add featured image use HTML
- Correct color profile and saving? Thumbnail creation?
- Allow users to upload attachments to certain posts
- WordPress and Advanced Custom Fields and Flickity
- How to get image ID based on get_theme_mod image URL?
- New portfolio items appearing smaller on the grid
- stop wordpress from resizing feature gif images
- Modify media file markup output
- Theme page headers and rotator images not assigned after website migration
- WPML – Change media uploader language
- WordPress Is Saving Original Image Only
- Display images from JS?
- Create a custom attachment thumbnail for quick page load
- Change the image for a certain URL
- How to make an image bigger with wp_get_image_editor
- Post migration – images do not display
- wp_handle_upload Image sizes
- Display Images from Array with wp_get_attachment_image() [closed]
- Orientation of featured image in post?
- Site header logo and parallax image on homepage do not display on iPhone
- WP_Image_Editor – How to save the new size of the image in the sizes metadata
- Is is possible to append .webp to srcset images using wp_filter_content_tags()?
- Could a very long article slow down all website and wpadmin?