A wee update - this seems to be a problem with the Pure theme - at least, that's the theme I'm using. The mobile variant that's automatically created by the theme seems to create an image from a php placeholder, which means that it can never display correctly when called from the server. When I change the mobile variant width to 560px and create a new variant of 480px width, the php is correctly included in the page and displays correctly in the browser.