title: How do i resize images on Upload to reduce the image size?
body: <p>I am trying to resize the images before saving them to the server. I want to reduce the image size before it gets to the server. Here i am uploading multiple images separated by ";".</p>
  
  <pre><code>public async Task&lt;IActionResult&gt; Create(Venue v){
  
  var files = HttpContext.Request.Form.Files;
   foreach (var Image in files)
       {
         if (Image != null &amp;&amp; Image.Length &gt; 0)
            {
              var file = Image;
              var filename = file.FileName;
              var uploads = System.IO.Path.Combine(Directory.GetCurrentDirectory(), "wwwroot/venue");
                      if (file.Length &gt; 0)
                      {
                       using (var fileStream = new FileStream(Path.Combine(uploads,filename),FileMode.Create))
                          {
                              await file.CopyToAsync(fileStream);
                              v.Image = v.Image + ";" + filename;
                          }
                       }
             }
         }
  
              _context.Venues.Add(v);
              _context.SaveChanges();
              return RedirectToAction(nameof(Index));
          }
  </code></pre>