유튜브 썸네일 크기 선명하게 하려면 어떻게 수정해야하나요?
본문
유튜브 썸네일 크기 선명하게 하려면 어떻게 수정해야하나요?
config.php에서 설정은 최대로 했어요~
define('G5_THUMB_JPG_QUALITY', 100);
define('G5_THUMB_PNG_COMPRESS', 0);
<div class="gall_con">
                    <div class="gall_img">
                        <a href="<?php echo $list[$i]['href'] ?>">
                        <?php
                        if ($list[$i]['is_notice']) { // 공지사항  ?>
                            <span class="is_notice">공지</span>
                    <?php } else {
                        $thumb = get_list_thumbnail($board['bo_table'], $list[$i]['wr_id'], $thumb_width, $thumb_height); // 썸네일 크기를 위에서 선언한 크기사용
                        //  유튜브, 비메오 썸네일 추출
                        if(!$thumb){ // 썸네일이 없는 경우
                            if($list[$i]['wr_1']) { // 유튜브 이미지 출력
                                $thumb['src'] = "http://img.youtube.com/vi/{$list[$i][wr_1]}/default.jpg";
                                
                            } 
                        }
                        //  유튜브, 비메오 썸네일 추출 end 
                        
                        if($thumb['src']) {
                            //$img_content = '<img src="'.$thumb['src'].'" alt="'.$thumb['alt'].'" width="'.$thumb_width.'" height="'.$thumb_height.'">';
                            $img_content = '<img src="'.$thumb['src'].'" alt="'.$thumb['alt'].'" width="100%" height="'.$thumb_height.'">';
                        } else {
                            $img_content = '<span style="width:'.$thumb_width.'px;height:'.$thumb_height.'px">no image</span>';
                        }
                        echo $img_content;
                    }
                     ?>
                        </a>
                    </div>
답변 1
$thumb['src'] = "http://img.youtube.com/vi/{$list[$i][wr_1]}/default.jpg";
부분을
$thumb['src'] = "http://img.youtube.com/vi/{$list[$i][wr_1]}/maxresdefault.jpg";
로 수정
                답변을 작성하시기 전에 로그인 해주세요.