Support

Account

Home Forums Add-ons Gallery Field images size after update library

Helping

images size after update library

  • i have this code in functions.php:

    //ADD SIZE TO MY IMAGE
    add_image_size( ‘imoveis-thumb’, 200, 130, true); //(cropped)

    //REGISTER FIELDS IN MY CPT
    register_field_group(array (
    ‘id’ => ‘imovel_galeria-do-imovel’,
    ‘title’ => ‘Galeria do imovel’,
    ‘fields’ => array (
    array (
    ‘key’ => ‘field_galeria’,
    ‘label’ => ‘galeria’,
    ‘name’ => ‘galeria’,
    ‘type’ => ‘gallery’,
    ‘required’ => 1,
    ‘preview_size’ => ‘imoveis-thumb’,
    ‘library’ => ‘uploadedTo’,
    ),
    ),
    ‘location’ => array (
    array (
    array (
    ‘param’ => ‘post_type’,
    ‘operator’ => ‘==’,
    ‘value’ => ‘imoveis’,
    ‘order_no’ => 0,
    ‘group_no’ => 0,
    ),
    ),
    ),
    ‘options’ => array (
    ‘position’ => ‘normal’,
    ‘layout’ => ‘default’,
    ‘hide_on_screen’ => array (
    ),
    ),
    ‘menu_order’ => 0,
    ));

    but when i update any image in library the code:

    get_field(‘galeria’)

    not update the ‘imoveis-thumb’ url

    why?

    • Elliot

    • October 21, 2013 at 6:19 pm

    Hi @leonardotessaro

    What do you mean by “but when i update any image in library the code:”

    It is most likely that you need to regenerate your thumbnails (cropped sizes)

    Please download a plugin called ‘regenerate thumbnails’ and run this tool

    Thanks
    E

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

You must be logged in to reply to this topic.

We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Cookie Policy. If you continue to use this site, you consent to our use of cookies.