Home > Article > Backend Development > How to get Exif thumbnail in PHP, get exif thumbnail_PHP tutorial
The example in this article describes how to get Exif thumbnails in PHP. Share it with everyone for your reference. The specific implementation method is as follows:
// file to read $file = 'test.jpg'; $image = exif_thumbnail($file, $width, $height, $type); // width, height and type get filled with data // after calling "exif_thumbnail" if ($image) { // send header and image data to the browser: header('Content-type: ' .image_type_to_mime_type($type)); print $image; } else { // there is no thumbnail available, handle the error: print 'No thumbnail available'; }
I hope this article will be helpful to everyone’s PHP programming design.