ImageApi optimizer performance issue