Skip to content

armgit / Vvveb

Public Imported from GitHub
0

Powerful and easy to use cms to build websites, blogs or ecommerce stores.

Image cache check to avoid regeneration if image file exists bug fix

givanz5947c75db753
diff --git a/system/images.php b/system/images.php
index ea27037..abe791e 100755
--- a/system/images.php
+++ b/system/images.php
@@ -71,7 +71,9 @@ class Images {
$image = self::size($image,"{$width}x{$height}");
if ($width || $height) {
- if (! file_exists($image)) {
+ if (file_exists(DIR_PUBLIC . $cacheFolder . $image)) {
+ $mediaFolder = $cacheFolder;
+ } else {
if (self :: resize(DIR_PUBLIC . $mediaFolder . $src, DIR_PUBLIC . $cacheFolder . $image, $width, $height, $method)) {
$mediaFolder = $cacheFolder;
} else {