fix bug where attachment images were sometimes keyed for nil URLs

Also default to “attachments” field if “childContent” is not available