채택완료

썸네일 라이브러리 이용 시 원본가져오기

2024-01-30 (화) 15:08:28 1,626

사용하기 편해서 파일첨부 기능을 이용하여

썸네일 이미지를 가지고 오는 부분입니다..

다만, 원본으로 가져오고싶은데 변수로 담거나 관리자에서 설정한 width,height가 아닌

원본자체를 가져올 수 있을까요?

계속 파일명에 크기가 붙어 호출되는 상황입니다..

...01e52807a6678d9e6a971f76d66b40_400x400.png

Copy
<ul class="MSwrapper swiper-wrapper">
            <?
            while ($rows = sql_fetch_array($sql)) {
                // 순번을 역순으로 표시

                $board['bo_gallery_width'] = 400;
                $board['bo_gallery_height'] = 400;

                $thumb = get_list_thumbnail($board['bo_table'], $rows['wr_id'], $board['bo_gallery_width'], $board['bo_gallery_height'], false, false);
                if($thumb['src']) {
                    //$img_content = '<img src="'.$thumb['src'].'" alt="'.$thumb['alt'].'" >';
                    $img_content = $thumb['src'];
                } else {
                    //$img_content = '<span class="no_image" style="'.$line_height_style.'">no image</span>';
                    $img_content = '/';
                }
            ?>

                <li class="MSslide swiper-slide">
                    <div class="MSbox">
                        <a class="MSlink" href="#none">
                            <div class="MStxt">
                                <?php echo $rows['wr_2']?>
                            </div>
                            <div class="MSimg" style="background: url(<?php echo run_replace('thumb_image_tag', $img_content, $thumb);?>) no-repeat center center/cover;">
                            </div>
                        </a>                        
                    </div>
                </li>

            <?php
            }
            ?>
        </ul>
|

답변 2개

채택된 답변
+20 포인트

$thumb['src']; 대신 

$thumb['ori']; 하면 됩니다

g5_board_file 에서 bf_file을 가지고 오시면 됩니다.

Copy
$sql = " select * from {$g5['board_file_table']} where bo_table = '". $bo_table. "' and wr_id = '". $wr_id ."' order by bf_no  limit 1";

답변을 작성하려면 로그인이 필요합니다.