Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #903902

    Hi everybody,
    Yet an other product slider image size bug to be fixed.
    For the woocommerce product slider, I set the woocommerce catalog images size to 350×350 both in woocommerce settings (admin dashboard) and in /enfold/config-woocommerce/config.php (‘shop-catalog’ variable)
    The weird thing is that despite these settings the avia_woocommerce_thumbnail function keeps using 300×300 size instead.
    Why? I couldn’t figure it out until I decided to change the line; $size = 'shop_catalog'; to this one: $size = 350; and then it worked!
    It looks like between the variable declaration and its call in avia_woocommerce_thumbnail function,, its value changes.
    I’m using an Enfold child theme, is it possible to add a filter to my fonction.php file in order to set rather the ‘shop_catalog’ or $size value to the right one once for all?
    Any kind help would be much appreciated.
    Regards.
    Gilles

    #904650

    Hey scriptorium,

    Thank you for using Enfold.

    Do you regenerate the images after adjusting the thumbnail size? I don’t think the modification is working. It’s probably using another thumbnail or resorting to a default one.

    Best regards,
    Ismael

    #904796

    Hi Ismael,
    Thanks for your answer.
    No need to regenerate at all:
    a/ regenerating thumbnails crops and doesn’t resize
    b/ the images xxx-350×350 do already exist for each xxx image
    Despite all of this, it works but using the generic image (top size) instead resized to 350×350, the expected dimensions
    Anyway the bug still exists and I do not see any solution
    Waiting for any further help.
    Best regards.
    Gilles

    #905391

    Hi,

    No need to regenerate at all:

    Adjusting the catalog image size won’t work without regenerating the thumbnails unless you’re uploading the images again.

    Best regards,
    Ismael

    #905589

    Hi,
    Once again, why regenerating thumbnails would work better, if the new chosen catalog image size already exist in the library for any of the images?
    It’s a none sens.
    Unless… the point is not to regenerate thumbnail image sizes which, I mean it, already exist, but to fix the database up. Don’t you think?
    If not, why?
    Best regards.
    Gilles

    #906362

    Hi,
    I wanted to prove my point, and its don.: While browsing the *_options table in my DataBase, I found the following options_names and there respective values:
    medium_size_w: 300 //WP images sizes
    medium_size_h:300
    I changed the values to 350 (remember, the values expected to get since I have all the images-350×350 already avalaible)
    I checked as well the options_names:
    shop_catalog_image_size: a:3:{s:5:”width”;s:3:”350″;s:6:”height”;s:3:”350″;s:4:”crop”;i:0;} //WooCommerce medium/catalog images sizes
    which already has the right expected values
    But… the images displayed in div.template-shop.avia-content-slider .thumbnail_container .img keep having 300×300 sizes!! Why ?
    Please, help.
    Thanks in advance.

    #906446

    Hi,

    I am afraid we cant know how WordPress database works and generated the images, what you post is also a JSON file.
    Please follow what Ismael asked you, so we can be able to go further with the results.

    Thank you very much

    Best regards,
    Basilis

    #907558

    Hi,
    Sorry to tell you’re wrong.
    I am not doing thing just because I am said to. I do know that regenerating thumbnails is to be used only for undefined images sizes, not for the ones defined by WP. Moreover the plugin doesn’t know how to resize images proportionally.
    Anyway, here’s the trick:
    in /enfold/config-woocommerce/config.php
    once the former $avia_config[‘imgSize’][‘shop_catalog’] values changed for the relevant ones, here 350 instead of 450 which match as well the ones defined in woocommerce settings, as above specified, replacing in the avia_woocommerce_thumbnail function the line: $size=’shop_catalog’ to this one: $size=array (‘350′,350’) makes the things works fine.
    As a matter of fact this could be done while the $avia_config[‘imgSize’][‘shop_catalog’] is initialized but I am sure if there wouldn’t be any collateral consequences, but if it could be done that would be much easier to maintain. Here’s my point: how is it possible modify the $avia_config[‘imgSize’][‘shop_catalog’] value in my Enfold child function.php?
    Thanks for your kind help
    Best regards.
    Gilles

    #907756

    Hi,

    You need to regenerate the thumbnails because WordPress will not automatically resize the existing images after changing the thumbnail size. If the current thumbnail size is 300x300px and then you changed it to 500x500px, the existing images or the images that were uploaded prior to the size modification are still 300x300px in size. This is why you need to regenerate the thumbnails. However, if you are uploading new images, those images will get the appropriate thumbnail size. I’m not sure how it’s working for you but if you want to change the default “shop_catalog” size on the child theme, use the “avf_modify_thumb_size” filter.

    Example: https://kriesi.at/support/topic/ (Purchase code hidden if logged out) /#post-604839

    Best regards,
    Ismael

    #907915

    Hi,
    Thanks for the help, if actually you couldn’t figure out my purpose.
    Best regards
    Gilles

    Post Scriptum; consider the thread as closed

Viewing 10 posts - 1 through 10 (of 10 total)

You must be logged in to reply to this topic.