Skip Navigation

[Gelöst] I can’t crop woocommerce product feature image.

Dieser Thread wurde gelöst. Hier ist eine Beschreibung des Problems und der Lösung.

Problem: I'm not able to crop the WooCommerce Product featured image using a custom size.

Solution: Our developers are working on a fix for the issue where custom image sizes are not working with the wpv-woo-product-image shortcode.

This support ticket is created vor 5 Jahre, 6 Monate. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

This topic contains 4 Antworten, has 2 Stimmen.

Last updated by Christian Cox vor 5 Jahre, 3 Monate.

Assisted by: Christian Cox.

Author
Artikel
#1138342
wooquestion.jpg

This shortcode [wpv-woo-product-image size="custom" width="225" height="225"]
I try to crop image but it's doesnt work.
and I need to link product image to product 's url but it's link to image file
How can i fix its.

sorry for my english.

#1138385

Hi, let me check with my 2nd tier support team about this, because I can see that the crop attribute is not supported: https://toolset.com/documentation/user-guides/views-shortcodes/#wpv-woo-product-image

However, you should be able to register your own custom image size with cropping applied. That's not working for me on my local test, so there may be a problem. I'll let you know what I find out.

In the meantime, you might be able to use the wpv-product-featured-image shortcode instead, since it will show the main product image. You can use cropping attributes with that shortcode:
https://toolset.com/documentation/user-guides/views-shortcodes/#wpv-post-featured-image

#1139008

wpv-product-featured-image is work fine but it's like wpv-post-featured-image
that's not working with plugin custom product label.
(I use this one hidden link)

that's plugin is work only with shortcode wpv-woo-product-image
actually it's just some little problem , I have some image come with rectangle shape and when it's scale down
the image height it's not amount 225px
I creat custom thumbnail size for add_image_size( 'custom-size', 225, 225, true );

So can you advise me how to make thumbnail for square image not auto height?

#1139777

I have some image come with rectangle shape and when it's scale down
the image height it's not amount 225px

The code you have here will crop from the center point, without scaling down:

add_image_size( 'custom-size', 225, 225, true );

You could try cropping from the top, like this:

add_image_size( 'custom-size', 225, 225, array('center', 'top') );

https://developer.wordpress.org/reference/functions/add_image_size/

#1193778
This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.