Overlaying advertisement on optimum images in electronic documents to be
displayed on the internet, wherein the electronic document includes at
least one image. Image parameters associated with the at least one image
in the electronic document are processed to obtain an optimum image, and
the advertisement is overlaid on the optimum image, such that it overlaps
with the optimum image. The optimum image may be determined by an image
recognition engine based on at least one object in the image identified
by the image recognition engine, or based on object information obtained
from a tagging module. The advertisement may refer to the object. The
advertisement may be selected based on contextual information associated
with the electronic document. The advertisement may be any of a graphic,
a video, and a text.