首页 文章

在woocommerce上如何删除此裁剪产品catergory缩略图?

提问于
浏览
6

我已经搜索并尝试自己修复几个小时,然而,我找不到合适的解决方案 .

我上传到Woocommerce的产品类别的图像被裁剪为1:1的宽高比,我希望它们保持原始尺寸和纵横比,我上传它们 .

我感到困惑的片段的主要部分是我的img src末尾添加了-150x150.png . 我如何删除它?我无法在任何woocommerce php文件中找到它 . 我假设上传缩略图时会添加这个?

php为显示图像而创建的代码如下所示:

<a href="http://localhost/radioactivewonderland/?product_cat=phone-charms">

    <img src="http://localhost/radioactivewonderland/wp-content/uploads/2015/02/cghjnfgchjn-150x150.png" alt="Phone Charms" height="" width="Phone Charms" />      




    <h3> Phone Charms <mark class="count">(1)</mark>        </h3>


</a>

2 回答

  • 0

    WooCommerce 3.4更新

    缩略图大小现在可在定制器中使用 . 您需要打开Customizer,然后选择WooCommerce,然后选择Product Images .

    Customizer>WooCommerce>Product Images

    “主图像”是单个产品图像 . 而“缩略图”是商店/档案循环图像 .

    管理设置中不再提供这些设置 .


    类别图像与 shop_image (或目录)缩略图的大小相同 . WooCommerce在其设置中处理其产品缩略图:

    WooCommerce->设置>产品>显示

    您可以更改其高度,宽度以及打开/关闭硬裁剪 .

    WooCommerce product image settings

    更改图像大小后,您需要regenerate thumbnails .

  • 8
    Firstly, go to Theme Options> Shop settings, and set “Enable Product Image Crop on Catalog pages” to OFF.
    
    Then navigate to Appearance> customize> WooCommerce> Product images, and set “Thumbnail cropping” to “uncropped.”
    
    Save the settings, and view your shop page out of the customizer. Your full images should display.
    
    Let me know if that works for you.
    

相关问题