Gallery by BestWebSoft
[resolved] album-thumb and photo-thumb doesn't seem to work (2 posts)

  1. webheadllc
    Posted 3 years ago #


    This is a great plugin, but I noticed my pages were loading the full size images on the galleries. Looking through the code it seems like the image sizes are only added on the admin side. I added the following to my theme and regenerated thumbnails and the correct image sizes are now used on the gallery and gallery-single templates.

    function wh_setup() {
        // get options from the database
        if ( 1 == $wpmu )
         $gllr_options = get_site_option( 'gllr_options' ); // get options from the database
         $gllr_options = get_option( 'gllr_options' );// get options from the database
        if ( !empty($gllr_options) && !empty( $gllr_options['gllr_custom_size_px'] ) ) {
            add_image_size( 'album-thumb', $gllr_options['gllr_custom_size_px'][0][0], $gllr_options['gllr_custom_size_px'][0][1], true );
            add_image_size( 'photo-thumb', $gllr_options['gllr_custom_size_px'][1][0], $gllr_options['gllr_custom_size_px'][1][1], true );
    add_action( 'after_setup_theme', 'wh_setup' );


  2. bestwebsoft
    Plugin Author

    Posted 2 years ago #

    Hello webheadllc,

    Perhaps, you initially had some errors when you installed plugin and necessary data didn't come to the database.
    We will note this but in the future versions.
    We are happy that you solved this problem.

    Kind regards,
    Support Team

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Gallery by BestWebSoft
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic