I've been looking for the answer to this problem for a while. I'm using nyroModal in gallery to show php pages. but the popup doesn't resize the first time it loads. I use this link:

<a href="galtest.php" class="nyroModal cursor" rel="gal"><img src="img/gallery/thumbs/OldMiami.jpg" class="Tips1" title="In the Backyard Of The Old Miami (Detroit, MI)" border="1"></a>`

To call up this php page:

    <style type="text/css">
            p.modal {
            text-align : center;
            p.title {
            font-weight : bold;
            p.caption {
            font-weight : normal;
    echo '
    <div style="margin:0 auto;">
    <p class="modal title"><strong>Blues by the Bay</strong></p>
    <img src="img/gallery/bbtb32.jpg" title="Blues by the Bay" border="1">
    <p class="modal caption">The Blues By The Bay Festival (Tawas, MI)</p>

The first time it loads, it doesn't re-size. After that it does.
I've tried

$(function() {
  showCloseButton: false,
  resize: true



But it won't resize the first time. I can set the width & height, but since the images are different sizes, that doesn't work too well.

try to include this line at the bottom then post if this works if not ill have a work around :

showCloseButton : false, closeOnClick : false, closeOnEscape : false

You also can try the following:

<script type="text/javascript">
     closeOnClick: false, /*actually you can remove these two lines */
     closeOnEscape: false, /*because they only disable how to close the window/popup */
 resize: true
} );


this will actually resize your pics when your document is ready.