title: Images VERY LARGE when downloading
body: <p>I'm trying to download some pictures from a website. When I download them with the browser they are much smaller than the one, downloaded with my code.They have the same resolution as the one downloaded with my code, but the difference between the filesizes is very large!</p>
  <pre><code>def download(url, pathname):
      &quot;&quot;&quot;
      Downloads a file given an URL and puts it in the folder `pathname`
      &quot;&quot;&quot;
      # if path doesn't exist, make that path dir
      if not os.path.isdir(pathname):
          os.makedirs(pathname)
      # download the body of response by chunk, not immediately
      response = requests.get(url, stream=True)
  
      # get the total file size
      file_size = int(response.headers.get(&quot;Content-Length&quot;, 0))
  
      # get the file name
      filename = os.path.join(pathname, url.split(&quot;/&quot;)[-1])
  
  
          # progress bar, changing the unit to bytes instead of iteration (default by tqdm)
      progress = tqdm(response.iter_content(1024), f&quot;Downloading {filename}&quot;, total=file_size, unit=&quot;B&quot;, unit_scale=True,
                          unit_divisor=1024, disable=True)
  
      with open(filename, &quot;wb&quot;) as f:
          for data in progress.iterable:
              # write data read to the file
              f.write(requests.get(url).content)
              # update the progress bar manually
              progress.update(len(data))
  </code></pre>
  <p>Example: <a href="https://wallpaper-mania.com/wp-content/uploads/2018/09/High_resolution_wallpaper_background_ID_77700030695.jpg" rel="nofollow noreferrer">https://wallpaper-mania.com/wp-content/uploads/2018/09/High_resolution_wallpaper_background_ID_77700030695.jpg</a></p>
  <ul>
  <li>Browser: About 222 KB</li>
  <li>Code: 48,4 MB</li>
  </ul>
  <p>How does this difference come about? How can I improve the code to download images in way, they are smaller?</p>