Django Sorl Thumbnail Resizing error -
i"m been using django sorl thumbnail , encountered problem.
i set settings on template scale image larger 500 width , height resize around 500 width , height. problem , happen if image lower fixed settings height , width 500.the image scaled 500 width , height . how can fix problem image lower 500 width , height not need resize.
{ % thumbnail item.image "x500" im %} <img src="{{ im.url }}"> {% endthumbnail %} 
i got solved it, have set upscale=false.
upscale boolean , controls if image can upscaled or not, default value true.
{% thumbnail item.image "x500" upscale=false im %} <img src="{{ im.url }}"> {% endthumbnail %} then images lower 500px not upscaled.
Comments
Post a Comment