• Reading time ~ 1 min
  • 20.04.2023

The php-heic-to-jpg PHP package is the easiest way to convert HEIC (High-Efficiency Image Container) images to JPEG with PHP and Laravel framework.

Using this package doesn't require any PHP libraries or external dependencies to be installed. The package works by using a binary file created with Golang that ships with this package. The package does the file conversions, and you get a simple interface to go from HEIC or JPEG:

use Maestroerror\HeicToJpg;

// Save the HEIC file as a JPEG
HeicToJpg::convert("image1.heic")->saveAs("image1.jpg");

// Get the content (binary) of the converted file:
HeicToJpg::convert("image1.heic")->get();

This package also provides a convenience method to check if a file is a HEIC file:

use Maestroerror\HeicToJpg;
 
if (HeicToJpg::isHeic("image.heic")) {
    // Your code
}

You can learn more about this package, get full installation instructions, and view the source code on GitHub.

Comments

No comments yet
Yurij Finiv

Yurij Finiv

Full stack

ABOUT

Professional Fullstack Developer with extensive experience in website and desktop application development. Proficient in a wide range of tools and technologies, including Bootstrap, Tailwind, HTML5, CSS3, PUG, JavaScript, Alpine.js, jQuery, PHP, MODX, and Node.js. Skilled in website development using Symfony, MODX, and Laravel. Experience: Contributed to the development and translation of MODX3 i...

About author CrazyBoy49z
WORK EXPERIENCE
Contact
Ukraine, Lutsk
+380979856297