URLs can have special characters, so, if that specific image URL has them, when entering it into the array, the code will detect the non-escaped special characters and you will have an error. Therefore, what you might try is something like this: