Gregwar / Image

A PHP library to handle images
MIT License
1k stars 191 forks source link

Allow image to not exist, if cached version available (configuration of dependencies?) #175

Open garygreen opened 3 years ago

garygreen commented 3 years ago

Presently if the source image does not exist it will generate an error/placeholder image.

This is due to the requirement of younger-than' => $this->getDependencies() https://github.com/Gregwar/Image/blob/f3dbe19318c95e0b73659f5ca70cbd63c6597ea5/Image.php#L502

However, if there is a cached version of the image exists for the operations you are trying to perform then it would be awesome if it could just return that.

Main motivation behind wanting this feature is because we want to delete our source images - but keep cached versions. As gregwar is the one that calculates the hash of the cached file - it makes sense to have it built in.