Removing unnecessary path modifiers from image urls