Refactor ImagesRenderer to avoid flickering

[#57495138]
Merge pull request #52 from concord-consortium/fixed-image-renderer

Fix flickering of images in md2d

[#57495138]