You are correct that the size of the picture in pixels doesn’t change, but the size in points is WRONG for ebooks, which leads to minuscule pictures in the ebook.
For some reason - I guess because Scrivener adjusts things for a page or the display - the illustrations are compiled at the wrong size for ebook, even if you simply link to them and don’t even touch them. It adjusts the DPI and uses this new value during compilation.
Anyway, I’ve found a solution that solves my two problems.
What I do is I use the command <$Img:/full_path/image.jpg;w=450> in the manuscript.
That way, when I compile for Word or PDF, the correct width of 450 is used irrespective of the pixel size of the image (Scrivener calculates the DPI allowing the image to be displayed at the specified size). Any change in the w= parameter produces the same file size based on the JPEG compression setting, it doesn’t change the size of the picture in pixels, it only changes the DPI of the resulting source file.
I then use a replacement for the e-book format compiling options (in the replacement tab) to replace the ;w=450> with ;w=1800> which is the best size for e-books.
If course if I need smaller pictures I’ll use a smaller value than 450, and will adjust the 1800 value for the ebook accordingly, and I’ll add another replacement for these set of pictures.
I can then 1) use any picture and it will be converted to the right size and 2) Scrivener will automatically compile with the correct DPI setting for e-book and for Word/PDF.
This is more elegant that renaming the folders everytime, and allows to try different sizes to see which results are best.
I can also adjust the JPEG compression to adjust the final file size of the picture. I wish it would be possible to specify the JPEG compression in the compiling options, that way it could be saved in the presets (Word or Ebook), but it’s not a big deal to change it before compiling.
I tried 2400 wide, 1800 wide and 900 wide native files and settled for 1800 wide for ebooks and a JPEG compression setting that gives me a good balance between file size and picture quality.
The illustrations are now in the right size and in much better quality than initially (much less compression artifacts), so I’m a happy camper. I can also use the same set of illustrations for all my output options and simply adjust the JPEG compression setting to save space on the ebook final size, while leaving a minimal compression when I output for word or PDF for max quality as I don’t mind about the file size in that case.
The only downside is that I don’t see the illustrations in Scrivener anymore (even in page view), but I’m happy with this compromise if it means the end result is good and compiling is easy.
Thanks again for all your help!