Fix image names to be jpeg
Extract url from javascript base_url