1) Use path_to_image instead of asset_path so it works with images that aren't in the asset pipeline
2) Don't load the default image regardless of display state - always use interchange to load the image via javascript and only if javascript is disabled use the default image as the image src. Should save on bandwidth on retina devices.
Hey.
I've taken your method and done this to it :
This does:
1) Use
path_to_image
instead ofasset_path
so it works with images that aren't in the asset pipeline2) Don't load the default image regardless of display state - always use interchange to load the image via javascript and only if javascript is disabled use the default image as the image src. Should save on bandwidth on retina devices.
Hope this is helpful :)