@DiapDealer and Doitsu...Yes, of course DiapDealer was right. In fact I had already implemented his suggestion because reformatImageLayout() was specifically written to provide a standard input image line format for the main formatImages() function.
But when I went back and saw the offending image line (with the missing image tag) in a fresh copy GG's epub in Sigil, I saw this:
Code:
<div class="illus">
<img alt="" class="img065" src="../Images/lsh-23-065.png"/></div>
Unfortunately, my code in the reformatImageLayout() function assumed that you should expect only one form of inline div/img tags i.e. inline only. I've now changed the code to expect all forms and GG's epub now goes through the plugin without any missing div tag problems.
My grateful thanks to you both for helping me out with this last problem.
@Doitsu...I will release the new version -- AddKindleMediaQueries(v0.1.5) --as soon as I can after some more testing. I'll let you know when the new version is released so you can test it in your own way. Thanks again.