I am creating a site where the user can post their advertisement and the user can upload a photo... I am posting the four latest ads pics in the top of my site... so everytime I navigate through my site those latest 4 ads pics will be displayed but the problem is it renders too long.. makes my site slowdown...
how can I optimize it? I need advice guys..
and btw, I'm saving those images in my database as blob.. and selecting the 4 latest ads in my database.
<?php if($latest_upload_count > 0){ ?>
<div class = "collapse navbar-collapse">
<div class = "container">
<div class = "row">
<?php while($get_lastest_pics = mysql_fetch_assoc($get_5_latest_ads_query_string_execute)){ ?>
<div class = "col-xs-3">
<img img src="data:image/jpeg;base64,<?php echo base64_encode($get_lastest_pics['img']); ?>" style = "height: 180px; width: 270px;" class="img-responsive img-thumbnail" alt="Cinque Terre" >
</div>
<?php } ?>
</div>
</div>
<br />
</div>
<?php } ?>
I tried omitting that and my site runs faster...
Aucun commentaire:
Enregistrer un commentaire