Jake Vanderwerf
2026-01-22 58e8ae0759ccfa97c478ccae4e0778bdce70966f
inc/utility/Image.php
@@ -17,6 +17,9 @@
   public function __construct()
   {
      $this->cache = CacheManager::for('images')->connectTo('post', 'attachment');
      if (JVB_TESTING) {
         $this->cache->clear();
      }
   }
   public function formatImage(int $ID, string $start = 'tiny', string $replace = 'large', bool $addLink = true, ?string $postSlug = null):string
@@ -25,7 +28,7 @@
         ['ID' => $ID, 'start' => $start, 'replace' => $replace],
         function() use ($ID, $start, $replace) {
            // Define size order for progressive enhancement
            $sizeOrder = ['tiny', 'medium', 'large', 'full'];
            $sizeOrder = ['tiny', 'directory-preview', 'thumbnail', 'medium', 'large', 'full'];
            $startIndex = array_search($start, $sizeOrder);
            $replaceIndex = array_search($replace, $sizeOrder);