Description
Currently DynamicImageResource asks for the image data in WriteCallback#write(Attributes). This is a bit too late because there is no way to say "there is no image".
I'm suggesting to move the call to getImageData() a bit earlier so if it returns null then 404 is returned.