ePub export excludes most images


I am having a problem with Scrivener and ePub exports. Most images are not showing up in the ePub file, when I open it up on a reading device.

Upon further investigation, it looks like all of the images have placeholders in the ePub file, but only two images (the cover, and the first image that appear in the book) are included in the ePub’s image folder when I open it in Sigil. In Scrivener, I am using the same compile settings for .mobi files (which turn out fine, and include all images) and ePub.

Here’s the HTML that is generated for the first image in the ePub. This image is included in /Images, and therefore it does appear in the ereader:

<p class="p11"><span class="s3"><img alt="Image" height="259" src="../Images/pastedGraphic.png" width="432" /></span></p>

Here’s the HTML that is generated for the next image, which is not included in /Images, and therefore appears as a broken image when I view it in Sigil or an ereader:

<p class="p16"><span class="s3"><img alt="Image" height="184" src="images/1__#$!@%!#__pastedGraphic.png" width="432" /></span></p>

This is the HTML for the second missing image:

  <p class="p16"><span class="s3"><img alt="Image" height="248" src="images/2__#$!@%!#__pastedGraphic.png" width="432" /></span></p>

All of the remaining image references (about 30) follow the n__#$!@%!#__pastedGraphic convention, and the images themselves are not located in /Images.

Am I doing something wrong? Is there some setting for ePub exports that is different than .mobi?