@@ -10,7 +10,7 @@ const PHCODE_INTERNAL_ATTR = GLOBALS.PHCODE_INTERNAL_ATTR;
1010
1111// image ribbon gallery cache, to store th e last query and its results
1212const CACHE_EXPIRY_TIME = 168 * 60 * 60 * 1000 ; // 7 days
13- const CACHE_MAX_IMAGES = 50 ; // max number of images that we store in the localStorage
13+ const CACHE_MAX_IMAGES = 60 ; // max number of images that we store in the localStorage
1414
1515// initialized from config, defaults to true if not set
1616let imageGallerySelected = config . imageGalleryState !== undefined ? config . imageGalleryState : true ;
@@ -367,7 +367,7 @@ ImageRibbonGallery.prototype = {
367367 }
368368
369369 const apiUrl = `https://images.phcode.dev/api/images/search?` +
370- `q=${ encodeURIComponent ( searchQuery ) } &per_page=10 &page=${ page } &safe=true` ;
370+ `q=${ encodeURIComponent ( searchQuery ) } &per_page=30 &page=${ page } &safe=true` ;
371371
372372 if ( ! append ) {
373373 this . _showLoading ( ) ;
@@ -483,10 +483,10 @@ ImageRibbonGallery.prototype = {
483483 if (
484484 searchQuery === _imageGalleryCache . currentQuery &&
485485 cachedImages &&
486- page <= Math . ceil ( cachedImages . length / 10 )
486+ page <= Math . ceil ( cachedImages . length / 30 )
487487 ) {
488- const startIdx = ( page - 1 ) * 10 ;
489- const endIdx = startIdx + 10 ;
488+ const startIdx = ( page - 1 ) * 30 ;
489+ const endIdx = startIdx + 30 ;
490490 const pageImages = cachedImages . slice ( startIdx , endIdx ) ;
491491
492492 if ( pageImages . length > 0 ) {
0 commit comments