Export image with dimensions

Is there a way to have object dimensions included when exporting the image?