implementing Martin Grimmes RescalingRichText to scale images down to screen size