Do not crash when rendering attachments with zero width or height