Removed image version script from application.html.erb and put it in each action where it is needed