Fallback Image

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.

Notes

This tag does mask potential errors, but it can be very useful when dealing with user submitted content which isn't critical.

Arguments:

Takes all the normal arguments that the imageTag() takes plus one more:

fallback

The image to display if the primary image fails.

Configuration:

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">

Usage Example:

<!--- in your view page --->
#imageTag( source= "avatar/user123.png", fallback= "avatar/default.png" )#

Uninstallation:

To uninstall this plugin, simply delete the /plugins/FallbackImage-0.1.zip file.

Credits

This plugin was created by Jordan Clark

Disclaimer

Remember that you use this at your own risk and I'm not responsible for anything. Please don't sue me :)

Warnings: The FallbackImage plugin may be incompatible with this version of Wheels, please look for a compatible version of the plugin
The LogUserAction plugin may be incompatible with this version of Wheels, please look for a compatible version of the plugin
The RequiredFields plugin may be incompatible with this version of Wheels, please look for a compatible version of the plugin
The JsonProperties plugin may be incompatible with this version of Wheels, please look for a compatible version of the plugin
The DefaultScope plugin may be incompatible with this version of Wheels, please look for a compatible version of the plugin
The Attachments plugin may be incompatible with this version of Wheels, please look for a compatible version of the plugin
The localerb plugin may be incompatible with this version of Wheels, please look for a compatible version of the plugin
The AssetBundler plugin may be incompatible with this version of Wheels, please look for a compatible version of the plugin
The PluginPackager plugin may be incompatible with this version of Wheels, please look for a compatible version of the plugin
The inWords plugin may be incompatible with this version of Wheels, please look for a compatible version of the plugin
Application: AlexTasselV3 [Run Tests]
Framework: Wheels 1.1.8
CFML Engine: Adobe ColdFusion 9,0,1,274733
Default Data Source: alextassel
Active Environment: Design
URL Rewriting: On
URL Obfuscation: Off
Plugins: FallbackImage
LogUserAction
RequiredFields
DefaultScope
JsonProperties
simpleProperties
Attachments
AssetBundler
localerb
inWords
PluginPackager
Route: home
Controller: Wheels
Action: wheels
Additional Params: name = fallbackimage
view = plugins
Caching Stats: hits: 0, misses: 0, culls: 0
Execution Time: 15ms (view ~15ms, action ~15ms)