회원들의 프로필 사진들을 보고있으면

용량이나 gif 가로세로 크기가 제어가 안되는것같던데

용량 또는 사이즈를 설정할 수 가 있을까요?

 

멤버콘트롤러 인데 저 밑부분에 gif 부분을 삭제하면되는지요...

그리고 사이즈 업로드 90 * 90 인데 사이즈 무시하고 원본도 올라가는데

이게 정상인건지 잘모르겠네여...

// Check uploaded file
if(!checkUploadedFile($target_file)) return;

$oMemberModel = getModel('member');
$config = $oMemberModel->getMemberConfig();

// Get an image size
$max_width = $config->profile_image_max_width;
if(!$max_width) $max_width = "90";
$max_height = $config->profile_image_max_height;
if(!$max_height) $max_height = "90";
// Get a target path to save
$target_path = sprintf('files/member_extra_info/profile_image/%s', getNumberingPath($member_srl));
FileHandler::makeDir($target_path);

// Get file information
list($width, $height, $type, $attrs) = @getimagesize($target_file);
if(IMAGETYPE_PNG == $type) $ext = 'png';
elseif(IMAGETYPE_JPEG == $type) $ext = 'jpg';
elseif(IMAGETYPE_GIF == $type) $ext = 'gif';
else
{
return;
}

 

  • ?
    elseif(IMAGETYPE_GIF == $type) $ext = 'gif'
    요길 지우면 되지 않을 까요
  • ? profile
    https://xetown.com/qna/393105

    기진곰 2016.10.07 16:13:09
    끝에서 9번째 줄 && $type != 1 를 지워주시면 됩니다.

    이거 보고 일단 적용은 했습니다. ㅜ