This plugin resides in the view layer. It simply wraps the internal call to $imageTag. If an error occurs because the image is missing or corrupt then you have the chance to provide a fall back image to be loaded instead of giving the end user a big fat error message.
This tag does mask potential errors, but it can be very useful when dealing with user submitted content which isn't critical.
Takes all the normal arguments that the imageTag() takes plus one more:
- type: string
- required: false
The image to display if the primary image fails.
You can also modify which environments the fallback image will be used in, so if you want to see errors in design, but not production this is your global siwtch.
<!--- in your settings.cfm ---> <cfset application.fallbackImage.environments = "production,maintenance">
<!--- in your view page ---> #imageTag( source= "avatar/user123.png", fallback= "avatar/default.png" )#
To uninstall this plugin, simply delete the /plugins/FallbackImage-0.1.zip file.
This plugin was created by Jordan Clark
Remember that you use this at your own risk and I'm not responsible for anything. Please don't sue me :)