title: What is the best to use phpthumb?
body: <p>I currently use phpthumb to generate thumbnails for profile pictures. <a href="http://phpthumb.gxdlabs.com/" rel="nofollow">http://phpthumb.gxdlabs.com/</a></p>
  
  <p>This is my current method:</p>
  
  <pre><code>&lt;?php
  $path_to_profile_pic = '../icons/default.png';
  $profile_pic = file_get_contents('icons/default.png');
  $small_profile_pic = PhpThumbFactory::create($profile_pic, array(), true);
  $small_profile_pic-&gt;adaptiveResize(25, 25);
  $small_profile_picAsString = $small_profile_pic-&gt;getImageAsString();
  ?&gt;
  &lt;img src="data:image/png;base64,&lt;?php echo base64_encode($small_profile_picAsString); ?&gt;" width="25" height="25" /&gt;
  </code></pre>
  
  <p>However, this is very slow due to base64 because it generates a large number of text in your code. <strong>What is the best way to use phpthumb to generate thumbnails?</strong></p>
  
  <p><strong>Edit</strong></p>
  
  <p><strong>Is there a way to do it without saving another image since it would consume more space?</strong></p>