title: HTML5 Image load not working in firefox android for images with size greater than 1MB
body: <p>I am creating an image previw and upload  page based on this <a href="https://demos.phplift.net/javascript-image-compress-using-html5-canvas-file-api/" rel="nofollow noreferrer">https://demos.phplift.net/javascript-image-compress-using-html5-canvas-file-api/</a>. It is working fine in all web browsers and in android firefox (version 88.1.4) it is not working with images have size greater than 1MB, no issues in android chrome browser. When I checked the image onload (in code it is <strong>i.onload()</strong>) function is not triggering for larger images in firefox</p>
  <p>html</p>
  <pre><code>    &lt;form id=&quot;upload_form&quot;&gt;
              &lt;label for=&quot;file&quot;&gt;Choose file&lt;/label&gt;
              &lt;input type=&quot;file&quot; id=&quot;fileinput&quot; /&gt;
              
          &lt;/form&gt;
  </code></pre>
  <p>javascript function is</p>
  <pre><code>&lt;script&gt;
      var output_format = null;
      var file_name = null;
      function readFile(evt) {
          var file = evt.target.files[0];
          var reader = new FileReader();
          reader.onload = function(event) {
              var i = document.getElementById(&quot;source_image&quot;);
              console.log(i);
                  i.src = event.target.result;
                  i.onload = function(){
                      
                      console.log(&quot;Image loaded&quot;);
                  }
          };
          output_format = file.name.split(&quot;.&quot;).pop();
          file_name = file.name;
          console.log(&quot;Filename:&quot; + file.name);
          console.log(&quot;Fileformat:&quot; + output_format);
          console.log(&quot;Filesize:&quot; + (parseInt(file.size) / 1024) + &quot; Kb&quot;);
          console.log(&quot;Type:&quot; + file.type);
          reader.readAsDataURL(file);
  
          return false;
      }
  document.getElementById(&quot;fileinput&quot;).addEventListener(&quot;change&quot;, readFile, false);
  &lt;/script&gt;
  </code></pre>
  <p>Does anyone know why images greater than 1 MB not trigring image onload in firefox?</p>