Merge "Improve image size change handling." into jb-dev