gambitph / WP-OTF-Regenerate-Thumbnails

Automatically regenerates your thumbnails on the fly when thumbnail sizes change.
https://wordpress.org/plugins/otf-regenerate-thumbnails/
GNU General Public License v2.0
77 stars 16 forks source link

After image size changing still getting the old size. #20

Open danielepennati opened 8 years ago

danielepennati commented 8 years ago

Hello, I have a custom image size defined in my function.php

add_image_size('home-slider', 1140, 522, true);

I've changed it to be larger

add_image_size('home-slider', 1680, 560, true);

I call this image inside a shorcode using standard wp function wp_get_attachment_image_src:

function cc_srtcd_slider_element($atts, $content = null) {
  extract(shortcode_atts(array(
    "img_url" => '',
    "lazy" => 'true',
    "resize" => 'true'
  ), $atts));
  $content =  do_shortcode( $content );
  $img_id = cc_get_attachment_id_from_src($img_url);
  $img_url = $resize === 'true' ? wp_get_attachment_image_src( $img_id, 'home-slider' ) : wp_get_attachment_image_src($img_id, 'full');
  $html = '<div class="item">';
  if ($lazy == 'true') {
    $html .= '<img class="owl-lazy" data-src="'.$img_url[0].'" />';
  } else {
    $html .= '<img src="'.$img_url[0].'" />';
  }
  $html .= $content.'</div>';
  return $html;
}
add_shortcode("slider_el", "cc_srtcd_slider_element");

After the change of the image size I'm still getting the old one. If I upload a new image I get the new size but all the previously uploaded picture are not updated to the new dimension. I've tried to deactivate and reactivate the theme but nothing changed.

I'm making something wrong? Could it be an issue relative to folder and file permission on the server? or is it a plugin bug?

thanks daniele

Basilakis commented 8 years ago

Have you regenerated your thumbnails?