Refactored to use image ids instead of file paths in url