Media handling fixes.
Image layout fixes.