php - How to display Original image from folder codeignihter -
i trying display image original folder. want display original image in 1366x768 window.
when change
<?php $width = 1366;$height = 768; ?>
height in line, automaticaly display crop image in height , width.
<div class="white_box"> <div class="box-body"> <span class="hide wallhashid"><?php echo $wallpaper->wallpaper_hash; ?></span> <?php $width = 1366; $height = 768; ?> <div class="row"> <div class="col-sm-12"> <div class="wallpaper_image"> <img class="thumbnail img-responsive" style="width:100%; height:auto; display:block; max-width:<?php echo $width; ?>px;max-height: <?php echo $height; ?>px;" src="<?php echo $this->image_workshop->crop_image(originals_folder_wf . '/' . $wallpaper->wallpaper_image_path, $width, $height, $wallpaper->wallpaper_crop_position, 'thumbnail'); ?>" alt="<?php echo $wallpaper->wallpaper_name; ?>"> </div> </div> </div> </div> </div> <?php } ?>
you don't have use $this->image_workshop->crop_image
function, or other function process image. can use absolute path of image , style css or html attributes height , width. example style css:
<img class="thumbnail img-responsive" style="width:<?php echo $width;?>px; height:<?php echo $height;?>px; display:block; max-width:<?php echo $width; ?>px;max-height: <?php echo $height; ?>px;" src="<?php echo originals_folder_wf . '/' . $wallpaper->wallpaper_image_path ; ?>" alt="<?php echo $wallpaper->wallpaper_name; ?>">
or html tag attributes:
<img class="thumbnail img-responsive" width="<?php echo $width;?>" height="<?php echo $height;?>" src="<?php echo originals_folder_wf . '/' . $wallpaper->wallpaper_image_path ; ?>" alt="<?php echo $wallpaper->wallpaper_name; ?>">
the down side load full size image in browser, gets resized. if care information size picture, should create thumbnails versions upload original. use thumbnail version of image.
Comments
Post a Comment