Rejig custom image caption function so it doesn't require a set width.