Fix publication image wrapper.

#6050 
The bug (no contextual links) existed only when there was no image.