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?

  • 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)

The topic ‘images size after update library’ is closed to new replies.