Consolidate dimension-check code into QR.post.
Reduces redundant generation of video/image elements for thumbnail
generation and dimension check code by merging them into one routine