title: How to customize Codeigniter Watermark text and Image using image library?
body: <p>I have added watermark text and image during uploading image.</p>
  
  <p>Watermark is added perfectly but issue with watermark size.</p>
  
  <p>when I upload medium size image watermark is added perfectly but when I upload large size image watermark text and image appear very small. And if I upload small image then watermark will appear very large.</p>
  
  <p>I want to add watermark on all images with similar size.</p>
  
  <p>So any other configuration for watermark so that this issue will resolved.</p>
  
  <p>Code :</p>
  
  <pre><code>    $this-&gt;load-&gt;library('upload');
      $this-&gt;load-&gt;library('image_lib');
      $config['image_library'] = 'GD2';
  
      for ($i = 0; $i &lt; $number_of_files; $i++) {
          $_FILES['file']['name'] = $files['file']['name'][$i];
          $_FILES['file']['type'] = $files['file']['type'][$i];
          $_FILES['file']['tmp_name'] = $files['file']['tmp_name'][$i];
          $_FILES['file']['error'] = $files['file']['error'][$i];
          $_FILES['file']['size'] = $files['file']['size'][$i];
          $config['source_image'] = $files['file']['tmp_name'][$i];
          $config['wm_text'] = 'Copyright example.com';
          $config['wm_type'] = 'text';
          $config['wm_font_size'] = '16';
          $config['wm_vrt_alignment'] = 'middle';
          $config['wm_hor_alignment'] = 'center';
          $this-&gt;image_lib-&gt;initialize($config);
          $this-&gt;image_lib-&gt;watermark();
  
          $config['source_image'] = $files['file']['tmp_name'][$i];
          $config['wm_overlay_path'] = './application/assets/images/example.png';
          $config['wm_type'] = 'overlay';
          $config['width'] = '50';
          $config['height'] = '50';
          $config['padding'] = '50';
          $config['wm_opacity'] = '100';
          $config['wm_vrt_alignment'] = 'bottom';
          $config['wm_hor_alignment'] = 'right';
          $config['wm_vrt_offset'] = '100';
          $this-&gt;image_lib-&gt;initialize($config);
          $this-&gt;image_lib-&gt;watermark();
  
          if (!$this-&gt;upload-&gt;do_upload("file")) {
              $errors++;
          } 
  }
  </code></pre>