resize sdwebImage swift
<p>Hello I am displaying images on my app using <code>sdwebImage</code>. I have a code here to resize the image</p>

<pre><code>func resizeImage(image: UIImage, newWidth: CGFloat) -&gt; UIImage {

    let scale = newWidth / image.size.width
    let newHeight = image.size.height * scale
    UIGraphicsBeginImageContext(CGSizeMake(newWidth, newHeight))
    image.drawInRect(CGRectMake(0, 0, newWidth, newHeight))
    let newImage = UIGraphicsGetImageFromCurrentImageContext()
    UIGraphicsEndImageContext()

    return newImage
}
</code></pre>

<p>The problem is the above function accepts the UIImage as parameter and <code>sdwebimage</code> accepts the URL. How can I call the above resize function in sdwebimage. or in short how Can I resize the image that are presenting through sdwebImage here</p>

<pre><code>   cell.profileImageView.sd_setImageWithURL(UIImage().absoluteURL(profileImageUrl as! String), placeholderImage: UIImage.init(named: "default-profile-icon")?.circle!, completed: completionBlock)
</code></pre>