Support » Plugin: YITH WooCommerce Compare » How to change table images size

  • Mike80

    (@miguel80)


    Hi there.

    First of all let me congratulate you for the plugin, I’m using the free version so far but it has been a great help! (I even used POedit to translate the PO files to PT-PT because the BR-PT files are in a different Portuguese and it all worked fine)

    I just have a small problem…until few time ago the images of my shop smartphones were beeing scaled correctly, but somehow that has changed, now every time I create a new product, the image on the compare table gets cut…that didn’t happened before, I’ve been trying to find an answer but I can’t find the problem!

    I took a look at the plugin PHP files and I found the following code in the general-options.php file on the templates folder (line 112):

    array(
    		    'name' => __( 'Image size', 'yith-woocommerce-compare' ),
    		    'desc' => __( 'Set the size for the images', 'yith-woocommerce-compare' ),
    		    'id'   => 'yith_woocompare_image_size',
    		    'type' 		=> 'woocompare_image_width',
    		    'default'	=> array(
    			    'width' 	=> 220,
    			    'height'	=> 154,
    			    'crop'		=> 1
    		    ),
    		    'std'	=> array(
    			    'width' 	=> 220,
    			    'height'	=> 154,
    			    'crop'		=> 1

    I tried to change those values but the images stay the same…the older ones are beeing displayed correctly but the recent ones are simply cutted!

    Can you please help me and tell me how can I resize the images so they appear correctly on the table? I woul appreciate some help.

    PS: Just remmebered I have another problem, at the bottom of the table I get the message “undefined” three times, I don’t know what it refers to because all configurations look ok. Any ideas?

    • This topic was modified 1 month ago by Mike80.

    The page I need help with: [log in to see the link]

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author YITHEMES

    (@yithemes)

    Hi there,

    Try to replace the ‘crop’ value with “0” and let us know if you solve the problem.

    Mike80

    (@miguel80)

    @yithemes

    Hi there,

    I’ve just realised I have an error on the description above…the folder where I found the array settings wasn’t on the “templates” folder but in the “plugin-options”.

    Either way I changed the value to “0”, both on “default” and “std” with no change in the outcome…

    It’s really strange because I have images I uploaded a couple months ago exactly with the same resolution (320*360) and they appear ok. These images original resolution somehow is beeing changed, I have on the plugin settings the resolution defined to 220*154 with hard crop disabled (also tried enabling it), but the old images appear at 300*338 in perfect conditions (with the resolution added at the end of the file tittle like this: https://loja-online.futurland.pt/wp-content/uploads/2019/08/huawei_p30_plus_detalhe_preto-300×338.png while the new cutted images appear like that: https://loja-online.futurland.pt/wp-content/uploads/2019/11/apple-iphone-11-frente-preto-meo-220×154.png )

    I’ve already tried changing the resolution in the plugin settings but it doesn’t work…what am I missing here??

    Plugin Author YITHEMES

    (@yithemes)

    Hi there,
    try to rebuilt the thumbnails, maybe with a free plugin that find wp.org and let me know.

    @yithemes

    Hi there…

    It didnĀ“t worked…worst, after the rebuild the images I had that appeared with the correct size (not cutted) all changed to the same format as the last new images…now when I open the compare table the images are all cutted (it’s strange because it only happens on the compare table)…

    I’m lost…

    PS: I just restored a backup and the old images (at 300*338) are displaying correctly again…even when I change the resolution on the compare table settings, the old ones don’t appear cropped but the more recent ones do! I really need some help, I can’t find out the origin of this problem…

    • This reply was modified 3 weeks, 1 day ago by Mike80.
    • This reply was modified 3 weeks, 1 day ago by Mike80.
    Plugin Author YITHEMES

    (@yithemes)

    Hi,
    please try to set the “Image size” option in YITH > Compare to a different size.
    For example

    Width: 137
    Height: 154
    Crop: NO


    and let us know if this will do the trick!

Viewing 5 replies - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.