Created
April 8, 2020 17:37
-
-
Save eurowebpage/ef0729ed359f09c425e8b03451350c48 to your computer and use it in GitHub Desktop.
image-php-performance-web-distant
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Créer un dossier ex: /images-dist/ | |
//A l'interieur crée un fichier avec le code si dessous pour chaque images ex:image1.php - image2.php - ... | |
<?php | |
$nom_image = "https://eurowebpage.eu/ewp/img-ewp-dist/1.jpg"; // l'url de l'image avec l'extension jpeg | |
header ("Content-type: image/jpeg"); | |
$image = imagecreatefromjpeg($nom_image); | |
imagejpeg($image); | |
?> | |
########## Côté intégration code html ########################### | |
Image PHP | |
<img src="chemin/dossier-images/image1.php" class="img-fluid" alt="image jpg" title="image jpg"> | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment