본문 바로가기
Open Source

티스토리 이미지 썸네일 비율 바꾸기

by 영감은어디에 2023. 1. 16.

 

 

skin.html 파일에서 원하는 thumbnail 찾아서 숫자 수정하면 됨.
예:  C600x600 :  600사이즈로 크롭된 이미지 가져옴 

그런데 사이즈가 몇 개로 고정되어 있고 스킨마다 조금씩 다름. 
그래서 그냥 백그라운드로 썸네일 이미지를 깔고 백그라운드 사이즈를 cover 로 주었음. 

커버는

<span class="thum" <s_cover_item_thumbnail>style="background-image:url('')
    !important"</s_cover_item_thumbnail>>
</span>
 

리스트는

<span class="thum" <s_article_rep_thumbnail>style="background-image:url('https://img1.daumcdn.net/thumb/R750x0/?scode=mtistory2&fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2FDeckh%2FbtrWg14k2uV%2FpjuufLjNhsNzscvbdtStp0%2Fimg.jpg')
    !important"</s_article_rep_thumbnail>>
</span>

 

css는

.post-item .thum { 
display: block; margin-bottom: 5px;  border: 1px solid #ddd;
overflow: hidden; position: relative; width: 310px; height: 190px; background-color: #eeeef0;  
background-repeat: no-repeat; background-position: center; background-size: cover; }