Skip to content

Instantly share code, notes, and snippets.

View SlimenTN's full-sized avatar
👋
happy to see you

Slimen Arnaout SlimenTN

👋
happy to see you
View GitHub Profile
@pqina
pqina / create-thumbnail.php
Last active June 29, 2023 18:13
Create thumbnails with PHP
<?
// Link image type to correct image loader and saver
// - makes it easier to add additional types later on
// - makes the function easier to read
const IMAGE_HANDLERS = [
IMAGETYPE_JPEG => [
'load' => 'imagecreatefromjpeg',
'save' => 'imagejpeg',
'quality' => 100