2018-07-16 08:43


I change the screenshot quality by change the scale, for high quality I use the high scale, it works for quality that the image size will be less than 15MB and for the higher quality it, not works, actually when the screenshot takes an image by more than 15 MB I can't do anything by that image data.

jQuery(document).ready(function($) {
  $('body').click(function(event) {
    html2canvas(document.getElementById("content"), {
      scale: 5.5,
    }).then(function(canvas) {
      // Export the canvas to its data URI representation
      var base64image = canvas.toDataURL("image/png");
      // console.log(base64image);
        <img src="` + base64image + `" alt="">
  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享
  • 邀请回答


  • douzai2562 douzai2562 3年前

    I finally found the solution It is related to the php.ini setting I change PHP.ini configuration as bellow and know I can take screenshot up to 90 MB by increasing the scale value.



    If not working please add these codes to functions.php file

    @ini_set('memory_limit', '-1');
    点赞 评论 复制链接分享