Virajsinh

Blob Image Show in html Using PHP

Sep 11th, 2024
23
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.24 KB | Source Code | 0 0
  1. <?php
  2.     // https://www.taeluf.com/blog/php/convert-image-file-to-blob-img-tag/
  3.     $path = 'http://your_image_path/image.jpg';
  4.     $source = file_get_contents($path);
  5.     $base64 = base64_encode($source);
  6.     $blob = 'data:image/jpeg;base64,'.$base64;
  7. ?>
Add Comment
Please, Sign In to add comment