changes img tag to rails image helper for gallery