Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

fida's avatar
Level 3

Intervention image source not readable.

i'm trying to import some photos from a website's directory http://example.com/photos but the photo's names contain blank space ex. "photo 1.jpg" (instead photo_1.jpg)

the intervention image can't read the photos (which has blank space in name) the exception is - "Image source not readable"

in my local environment using GD driver

0 likes
3 replies
Tray2's avatar

You probably need to escape the space \ so it would become photo\ 1.jpg

Sinnbeck's avatar
Sinnbeck
Best Answer
Level 102

Or replace space with the url equivalent %20

fida's avatar
Level 3

Thanks @sinnbeck

i tried urlencode() and rawurlencode() both failed.

now manually replaced space with '%20' it works :)

$photo_url = str_replace(' ','%20',$photo_url);

Please or to participate in this conversation.