So I'm using this WP theme which is 99% awesome... however, I just found out last night, every time someone visits the home page it generates new image thumbnails.
So, like, if my site has 1000 visitors, it makes the server go through the process of generating thumbnails 1000 times. No idea what'd happen if 2 people accessed the site at the same time.
Anyway, I know Jack Schitt about pulling records from the DB with PHP; is there a quick/obvious fix here?
Instead of Mobility_Image::getResizedAttachmentTag($slide['third'], $galleryParams['thirdWidth'], $galleryParams['thirdHeight']) how do I have it simply get the file name of the original image?
<?php if (Mobility::getThemeOption('sliderType') == 'threeWaySlider'): ?> <?php $slides = Mobility::getThemeOption('slides') ?> <?php if (!empty($slides)): ?> <?php foreach ($slides as $slide): ?> <?php $slidePost = (int) $slide['slidePost'] ?> <?php if ($slidePost && is_object($postData = get_post($slidePost))): ?>
<div class="opacity-box6">
<h2><a href="<?php echo get_permalink($slidePost) ?>"><?php echo wp_specialchars($postData->post_title) ?></a></h2>
<p><?php echo wp_specialchars($postData->post_excerpt) ?></p>
</div>
<?php endif ?>
<?php wp_reset_query() ?>
<?php echo Mobility_Image::getResizedAttachmentTag($slide['main'], $galleryParams['mainWidth'], $galleryParams['mainHeight']) ?>
</div>
<div class="second"><?php echo Mobility_Image::getResizedAttachmentTag($slide['second'], $galleryParams['secondWidth'], $galleryParams['secondHeight']) ?></div>
<div class="third"><?php echo Mobility_Image::getResizedAttachmentTag($slide['third'], $galleryParams['thirdWidth'], $galleryParams['thirdHeight']) ?></div>
</li>
<?php endforeach ?>
</ul>
<div class="overlay"><a href="#">Â </a></div>
</div>
</div>
<?php endif ?>
<?php endif ?>
<3
Decided to just say fuggit and code the shit manually. I won't be updating it often enough to need a DB-fed version.