Fixed a regression introduced in EZP-20831

imageId wasn't generated when creating content, leading to a fatal
error if content was created AND the Accept header was set
to Content instead of the default ContentInfo (see EZP-20948)