如何在photoswipe插件上显示原始图像

时间:2015-12-10 12:39:24

标签: php html css

我下载了一个PhotoSwipe插件http://photoswipe.com/它运行正常,当我在img标签中显示图像时我想要显示原始高度和宽度,下面的代码我试过但图像显示模糊

<div class="my-gallery" itemscope itemtype="">
<?php 
$i = 0;
$sql=mysql_query("SELECT * FROM useralbum WHERE ssmid='$ssmid' ORDER BY photo_uploadedon DESC");
$count = mysql_num_rows($sql);
if($count >= 1){
while($row=mysql_fetch_assoc($sql)){
$image = "original-photo/".$row['photo'];
list($width, $height, $type, $attr) = getimagesize($image);
?>
<figure <?php if(0 != $i) { ?>style="display:none;" <?php } ?>>
<a href="original-photo/<?php echo $row['photo']?>" itemprop="contentUrl" data-size="<?php echo $width; ?>x<?php echo $height; ?>" data-med="original-photo/<?php echo $row['photo']?>" data-med-size="<?php echo $width; ?>x<?php echo $height; ?>" class="demo-gallery__img--main">
  <img src="img/user-album/thumbnail/<?php echo $row['thumbnail']?>" itemprop="thumbnail" alt="Image description" style='dispaly:none'/>
</a>
</figure>
</div>

0 个答案:

没有答案