Viewing 6 replies - 1 through 6 (of 6 total)
  • Caleb Burks

    (@icaleb)

    Automattic Happiness Engineer

    It has to do with the actual image sizes.

    Before: https://cld.wthms.co/7rONEF
    After: https://cld.wthms.co/2fAGT4

    You can change the single product image width in the customizer settings. Else can also be declared by the theme: https://github.com/woocommerce/woocommerce/wiki/Customizing-image-sizes-in-3.3

    Can regenerate with this after a change for faster regenerations: https://www.ads-software.com/plugins/regenerate-thumbnails/

    Thread Starter bagiravg

    (@bagiravg)

    Thank you for the answer!

    In the customizer I have no option to set image size, only thumbnail cropping. If I understand correctly, that means that Storefront theme somewhere declares image sizes? Can you point where it happens and how I can override that?

    • This reply was modified 7 years ago by bagiravg.
    Thread Starter bagiravg

    (@bagiravg)

    OK, found where Storefron declares image size (/storefront/inc/class-storefront.php).
    I can of course change the size directly in this file, but I know it is not a good solution.

    Caleb Burks

    (@icaleb)

    Automattic Happiness Engineer

    Right, you should not edit the theme directly. Use a child theme https://codex.www.ads-software.com/Child_Themes

    Thread Starter bagiravg

    (@bagiravg)

    Well, the problem is I COULDN’T override it in child theme as what I’ve tried to change in style.css hasn’t worked. I assume there is a way to do it but I don’t know it. So I had to change storefront theme directly.

    Caleb Burks

    (@icaleb)

    Automattic Happiness Engineer

    It is definitely overridable. Just need to make sure you do it at the right time (using the right hooks). The filter for changins the sizes should be declared inside of a function hooked onto after_theme_setup for example, but after the parent theme’s hook.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Size of Single product image in woocommerce’ is closed to new replies.