Renamed type attribute to extension in the Image model due to Rails conflict.