small refactor for image handler in plex lib