Cleaning up API to work with image url at the end of API request