I'm not sure about CS5, but in CS6 you can choose to either export images at a specific size or 'relative to page width'. Regarding the latter, I have experimented a bit by comparing the sizes of images set in InDesign against the resulting code once exported to EPUB. To the best of my knowledge, if you choose to export relative to page width:
InDesign creates a copy of each image basing the dimensions of the new file on the picture box dimensions from InDesign. Keeping this in mind and the fact that images are rasterized as specified in the object export settings, the size of the original linked image becomes irrelevant.
In the code, a class is created for every differing width of image based on the percentage width of the InDesign page. If your images are laid out using column guides, the number of different img classes that InDesign creates will be reduced as you are limiting the variety of image widths used within your document. For example:
If your InDesign page is 210mm and an image / picture box has a width of 105mm, in the resulting HTML, InDesign will assign the image a class (in this case “frame-3”)
<img class=”frame-3″ src=”image/Imagefilename.jpeg”/>
and a rule will be added to the CSS file that stipulates that frame-3 should display at 50% of the eReader's page width:
img.frame-3 {width:50%;}
If your image sits inside a div (paired with a caption for example), the div will receive a class too and additional rules will be applied to the object.
Now. This is the part that I'm slightly unsure of! It seems to me that the above holds true when the iPad (can't vouch for any other devices) is held in portrait orientation. When held in landscape orientation (and iBooks displays a double page spread rather than a single page), images only change size accordingly if they are larger than the new page – but if not, they remain at the size they were displayed while in portrait mode. Roughly speaking, this means that if an image is displayed at 25% width in portrait, when the device is rotated to landscape, it is displayed at approx 50% of a single page. All roughly speaking mind ie. disregarding margin dims etc.
Can anyone shed any more light on this subject or confirm that what I've just said is correct? I've concluded all this by experimentation but because of a degree of inconsistency in the results cannot yet claim that any of it is for definite! I'm having issues controlling the size of images (tall ones are forcing captions to split and jump to the next page) and would like to fully understand for certain firstly how InDesign writes the rules and secondly how iBooks interprets them.
Cheers.