I have a very High resolution image in illustrator, which leads to a very heavy eps file size, I'm asking for a batch tool or a script to compress the eps image , in other words reduce its resolution without affecting the width and height of the image.I don't want to export the image as a separated Jpg file
Object > Rasterize and choose a lower resolution setting.
This will embed any linked image, however.
What if you exported the files as PDFs? As part of the process, you can change the resolution of all images in the document. They're scaled so that the positioning is kept in tact.
From there, you could resave as EPS, if required (although I can't think of many situations where a EPS would be required over a PDF?).
Here's how to change the resolution of images as you save as a Illustrator PDF:
To keep the document fully editable in Illustrator, turn on
Preserve Illustrator Editing Capabilities.
Most things in Illustrator can be Actioned, so depending on your exact requirements, you may be able to reduce some of the repetition.
OS X's Automator can also reduce images in EPS and PDF files, but you don't have any control over how much they're reduced. If that sounds interesting,
Apply Quartz Filter to PDF Documents is the action is the one you want, because it contains a
Reduce File Size filter.
Built into Bridge is a handy script called "Image Processor" (
Tools > Photoshop > Image Processor...). This allows you to select a bunch of images and run them through Photoshop to save PSD, JPEG or PNG copies. You can specify the maximum size (horizontal and vertical) in the dialog.
For even more sophistication and options, you can install some of Dr. Brown's Services, which include Image Processor Pro v2.2.8 (scroll down to find it). Russel Brown has a fantastic collection of scripts and other Photoshop add-ons.
To eliminate the problem of slow processing with complex vector files, go with Illustrator CS6, which has the new "Mercury Performance Engine" (works best with NVidia GPUs) and is blindingly fast compared with any previous version.