I've moved your question to the InDesign EPUB forum.
select your image and set "custom width" for size in the EPUB and HTML tab. Set the width to the percentage value you want the image to take the screen width. Example: 100%
This screenshot is from InDesign CC 2014.1. If you have InDesign CC, you will have two dropdowns for width and height. In this case select the same for width and "none" for the height.
In InDesign CC 2014.1 you can finally set this size setting in the object styles, too. Thats great as you can quickly apply the size to hundreds of images in a few minutes, without modifying the original layout.
Thank you for the suggestion. I tried this, and the image doesn't re-size proportionally rather it stretches when the window size is large or extended towards one axis. I need the image size to increase in proportion to the window size.
I'm using InDesign CC 2014.1, while setting the custom width to 100%, custom height is automatically selected as 100%. I couldn't change the height and width separately.
usually this works fine when resizing the window (retaining the proportions), so I'm not sure what you are trying to get as result (screenshots, video???). There is a bug in ADE4 when floating, so try also in another reader.
Or if you mean reproducing the css "background-size: cover;" behavior, this will not work this way in ePub 2. This needs to be set in the CSS by yourself: only ePub 3 and with limitations.
OK, here's the screen shot of what i actually need in EPUB 2.0.1 -
But, here's what is happening -
and after changing the width to 100%, this is what i got -
I exported the same InDesign file to EPUB 2.0.1 and EPUB 3,0, extracted the css and found both the css to be exactly the same but yet output is different.
you have two things.
1. What you are showing here is the cover. The cover has a special behavior compared to images inside an ePub. The cover size can't be set by InDesign. It's predefined. This needs then to be changed in the final HTML/CSS.
2. What you are showing in the screenshot is to have the images fit to the height of the window (not the width as indicated above).
In the html of the cover you should have something like: <img src="image/epub-cover.jpg" alt="epub-cover.jpg" style="max-width:100%" />
Change it to: <img src="image/epub-cover.jpg" alt="epub-cover.jpg" style="height:100%" />
(quick workaround, there is a better way but it needs time to explain)
For Images inside the document:
This is now very special to get the images to always fit the full height of the browser window. Set in the object export options the size to custom height: 100vh
But be warned. Its usually an epub 3 feature and it does not work in all readers. Unfortunately there is no better way.
Alternatively, split every (fullscreen) image to its own XHTML file and set custom-height: 100% in the object export options.
This works fine in ePub 2 and ePub 3 and major readers, too but has other consequences.
Thank you, and apologies for messing up with height and width.