Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Sayontan Sinha

    (@sayontan)

    Hi,
    I have never experimented with this, but here is my guess. Look for the method build_level_1_objects. In there you will see the following:

    $thumb = "{$photonic_smug_thumb_size}URL";
    	$main = "{$photonic_smug_main_size}URL";
    	$photo_object['thumbnail'] = $image->{$thumb};
    	$photo_object['main_image'] = $image->{$main};
    	$photo_object['title'] = esc_attr($image->Caption);
    	$photo_object['alt_title'] = esc_attr($image->Caption);
    	$photo_object['main_page'] = $image->URL;

    Basically instead of setting $photo_object['thumbnail'] = $image->{$thumb} for the thumbnail, do something like this:

    $photo_object['thumbnail'] = str_replace(array('/Th/', '-Th.'), array('/500x500/', '500x500.'), $image->{$thumb};

    This will hopefully work.

    Thread Starter mattstockdale

    (@mattstockdale)

    Hi Sayontan,

    You’re a total legend. Thank you so much. That worked!

    So for anyone else who’s interested, replacing:
    $photo_object['thumbnail'] = $image->{$thumb};

    For:
    $photo_object['thumbnail'] = str_replace(array('/Th/', '-Th.'), array('/250x250!/', '-250x250!.'), $image->{$thumb});

    Gives you this: https://www.linkethiopia.org/school-resources/posters/

    Sayontan, thank you again for a great plugin and support. Matt

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Custom thumb size url for Smugmug’ is closed to new replies.