Fix image URI calculation