[TECHNICAL SUPPORT] LPS-31861 Wrong conditions is repeated at finding the right value for imageThumbnail for legacy image gallery links