some intermediate images shows smaller in size
In php when I called echo image with the dynamics path it shows some images in small size and some in actual size. most time the intermediate images are shown small in browser
<td align="center">
<?php $image_path = "components/com_mediaonline/uploads/uploads/" . $row["photo_id"] . "/thumb/" . $row["filename"]; ?>
<a href="<?php echo $base_url . "&task=" . $operation_model_photoset_photo_click . "&photoset=" . $photoset . "&model_id开发者_JAVA技巧=" . $model_id . "&filename=" . $row["id"] ;?>"><img style="border:2px solid #ccc;" src="<?php echo $image_path; ?>" alt=""></a>
</td>
what you think whould be the reason for this
Your code is not forcing any size info on the image, so the reason has to be elsewhere, either in the files themselves, or possibly some obscure CSS setting somewhere (e.g. max-width
).
Either way, you'll have to analyze the images, and look into any CSS settings, e.g. using Firebug's "Inspect element" feature (right-click on the image with Firebug installed). That will give you all CSS rules that are applied to the element.
Reason: You are using Joomla and it automatically creates thumbnails (small image preview) of images in thumbs
folder. Your code is displaying these photos instead of original images. This thumb
folder of current folder holds the thumbnails for its parent directory.
Solution: So, your second code line should be like this (replace the "/thumbs/"
with "/"):
<?php $image_path = "components/com_mediaonline/uploads/uploads/" . $row["photo_id"] . "/" . $row["filename"]; ?>
精彩评论