From 58e8ae0759ccfa97c478ccae4e0778bdce70966f Mon Sep 17 00:00:00 2001
From: Jake Vanderwerf <get@jakevanderwerf.ca>
Date: Thu, 22 Jan 2026 22:40:02 +0000
Subject: [PATCH] =DirectoryManager.php updates, some javascript tweaks for CRUD.js, and minor style changes

---
 inc/utility/Image.php |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/inc/utility/Image.php b/inc/utility/Image.php
index d9a9515..4901435 100644
--- a/inc/utility/Image.php
+++ b/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);
 

--
Gitblit v1.10.0