jperezmedina / timthumb

Automatically exported from code.google.com/p/timthumb
0 stars 0 forks source link

Define a default image path #227

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
When an image can't be found by the script, it would be practical to can define 
a default image.
Instead to receive a "Could not find the internal image you specified.", the 
default image could be returned.

Original issue reported on code.google.com by f...@cozic.fr on 9 Aug 2011 at 3:44

GoogleCodeExporter commented 8 years ago
Done. We now have support for error images and not found images. Please grab 
the latest version and configure NOT_FOUND_IMAGE and ERROR_IMAGE to get images 
instead of messages.

Original comment by mmaun...@gmail.com on 10 Aug 2011 at 8:28

GoogleCodeExporter commented 8 years ago
awesome ! 

Original comment by f...@cozic.fr on 10 Aug 2011 at 8:31

GoogleCodeExporter commented 8 years ago
Can this be set in the script as a parameter? I.e., if an image isn't found I'd 
like to specify a fallback image depending on the context in which I'm calling 
timthumb.php

Original comment by david.sz...@gmail.com on 11 Aug 2011 at 10:28

GoogleCodeExporter commented 8 years ago
I guess for theme developers this would be pretty cool. Going to wait for more 
feedback on this. Thanks for the suggestion. Reopening.

Original comment by mmaun...@gmail.com on 12 Aug 2011 at 12:12

GoogleCodeExporter commented 8 years ago
I would suggest not needing parameters or settings at all. If we just had 2 
images in the same directory as TimThumb and then used those instead it would 
simplify things greatly.

For example we could have error.png and default.png and if needed then they get 
loaded based upon the requirements.

Original comment by BinaryMoon on 12 Aug 2011 at 6:32

GoogleCodeExporter commented 8 years ago
I worry that if a user has an image that just happens to be called default.png 
they're going to not expect the behavior they're getting. I think having two 
images as config params is a good compromise between query params and grabbing 
defaults. Happy to debate this more, but if there's no feedback within a few 
days I'll close it. 

Original comment by mmaun...@gmail.com on 15 Aug 2011 at 7:53