JavaScript fix for single property image