I did not have access to your images because they are hidden behind JavaScript so I used Linux desktop backgrounds which are over one meg each. The image sizes are shown for every image.
Your images can be substituted in the $imgs array.
Here is the AmpProject.org version
> [**Tools.Pingdom.com**](https://tools.pingdom.com/#!/dTOyif/https://www.amppagemaker.com/assets/sp-coding-noobie/test-003.php) - 405.ms to load about 50 images
> and not forgetting the [**FREE GOOGLE CACHED Version**] (https://cdn.ampproject.org/c/s/www.amppagemaker.com/assets/sp-coding-noobie/test-003.php)
### Source Code: ``` <?php declare(strict_types=1); error_reporting(-1); ini_set('display_errors', '1');
$imgs =
[
‘assets/imgs/happier-than-a-corgi-on-stilts.jpg’,
‘assets/imgs/jokes/blogging-20-says-i-can-get-mre-post-than-you.png’,
‘assets/imgs/jokes/browsing-for-funny-stuff.png’,
‘assets/imgs/jokes/captain-kirk-error-message.jpg’,
‘assets/imgs/jokes/coffee-helps-you-do-stupid-things-faster.jpg’,
‘assets/imgs/jokes/congratulations-dash.png’,
‘assets/linux-17/A_star_has_fallen_by_Juan_Pablo_Lauriente.jpg’,
‘assets/linux-17/Alien_wing_by_Ralph_Crutzen.jpg’,
‘assets/linux-17/Candy_by_Bernhard_Hanakam.jpg’,
‘assets/linux-17/Classic_Guitar_Detail_by_Sten_Jorgen_Pettersen.jpg’,
‘assets/linux-17/DSC3907_by_Todor_Velichkov.jpg’,
‘assets/linux-17/Espaciolandia_by_Nando_uy.jpg’,
‘assets/linux-17/Forest_by_Moritz_Reisinger.jpg’,
‘assets/linux-17/Haukland_Beach_view_by_Michele_Agostini.jpg’,
‘assets/linux-17/IMG_0081_by_Jobin_Babu.jpg’,
‘assets/linux-17/IMG_7632_by_Jobin_Babu.jpg’,
‘assets/linux-17/Mushrooms_3_by_moritzmhmk.jpg’,
‘assets/linux-17/P1310728_by_Ferran_Reyes.jpg’,
‘assets/linux-17/Passion_by_Vilia_Majere.jpg’,
‘assets/linux-17/Pink_and_Blue_by_Ashwin_Deshpande.jpg’,
‘assets/linux-17/Purple_Daisy_by_Maria_Scotto.jpg’,
‘assets/linux-17/Road_to_Nowhere_by_Matt_Bailey.jpg’,
‘assets/linux-17/Seebrucke_Graal-Muritz_by_Oliver_hb.jpg’,
‘assets/linux-17/Some_Light_Reading_by_Brandilyn_Carpenter.jpg’,
‘assets/linux-17/Wanaka_Tree_by_Stephane_Pakula.jpg’,
‘assets/linux-17/Yak_Wallpaper_Grey_4096x2304.png’,
‘assets/linux-17/Yala_mountain_by_Geza_Radics.jpg’,
‘assets/linux-17/Zapus_Wallpaper_Grey_4096x2304.png’,
‘assets/linux-17/larung_gar_by_night_by_Geza_Radics.jpg’,
‘assets/linux-17/there_is_something_human_in_that_stuff_by_Pierre_Cante.jpg’,
‘assets/linux-17/ubuntu-default-greyscale-wallpaper.png’,
‘assets/linux-17/ubuntu16_10_by_Khoir_Rudin.png’,
‘assets/linux-17/ubuntu_wallpaper_16_10_02_by_screen_name_007.jpg’,
‘assets/linux-17/warty-final-ubuntu.png’,
‘assets/linux-bg/160218-deux-two_by_Pierre_Cante.jpg’,
‘assets/linux-bg/Black_hole_by_Marek_Koteluk.jpg’,
‘assets/linux-bg/Cielo_estrellado_by_Eduardo_Diez_Vihuela.jpg’,
‘assets/linux-bg/Dans_ma_bulle_by_Christophe_Weibel.jpg’,
‘assets/linux-bg/Flora_by_Marek_Koteluk.jpg’,
‘assets/linux-bg/Icy_Grass_by_Raymond_Lavoie.jpg’,
‘assets/linux-bg/Night_lights_by_Alberto_Salvia_Novella.jpg’,
‘assets/linux-bg/Spring_by_Peter_Apas.jpg’,
‘assets/linux-bg/TCP118v1_by_Tiziano_Consonni.jpg’,
‘assets/linux-bg/The_Land_of_Edonias-by-somebody-greek.jpg’,
‘assets/linux-bg/clock_by_Bernhard_Hanakam.jpg’,
‘assets/linux-bg/eric-skwarczynski-233332.jpg’,
‘assets/linux-bg/kai-gradert-233001.jpg’,
‘assets/linux-bg/passion_flower_by_Irene_Gr.jpg’,
‘assets/linux-bg/warty-final-ubuntu.png’,
];
//================================================================
function getImage($img, $layout=‘responsive’, $dims=NULL) // fixed
{
$img ==> ‘assets/linux-bg/160218-deux-two_by_Pierre_Cante.jpg’
$IMG = ‘/var/www/amppagemaker.com/public_html/’ .$img;
$tmp = getimagesize($IMG);
if($dims):
// image specific
else:
$dims = $tmp[‘3’];
endif;
$fSize = number_format( (float) filesize( $IMG ) );
$tmp = <<< ____TMP
<amp-img
src=“https://www.amppagemaker.com/$img”
$dims
File size: $fSize bytes
layout=“$layout”
alt=“an image”></amp-img>
<amp-img
src=“https://www.amppagemaker.com/$img”
$dims
layout=“$layout”
alt=“an image”>
____TMP;
return $tmp;
}///
require ‘test-amp-head.php’;
?>
Menu
<a class="btn tdn fwb"
href="https://cdn.ampproject.org/c/www.amppagemaker.com/assets/sp-coding-noobie/test-003.php"
title="https://cdn.ampproject.org/c/www.amppagemaker.com/assets/sp-coding-noobie/test-003.php">
GOOGLE <b class="fsl clc">⚡</b> Version
AMP-IMG
Small images above the fold
<?php
foreach( $imgs as $id => $img):
echo getImage($img, $layout='responsive', $dims=NULL);
endforeach;
?>
¯\_(ツ)_/¯
The include file: :test-amp-head.php
<?php
// <!-- v-components.php -->
?><!DOCTYPE HTML>
<html ⚡ lang="en">
<head>
<meta http-equiv='content-type' content='text/html; charset=utf-8'>
<meta charset='utf-8'>
<meta name='viewport' content='width=device-width,minimum-scale=1,initial-scale=1'>
<style amp-boilerplate>
body{-webkit-animation:-amp-start 8s steps(1,end) 0s 1 normal both;-moz-animation:-amp-start 8s steps(1,end) 0s 1 normal both;-ms-animation:-amp-start 8s steps(1,end) 0s 1 normal both;animation:-amp-start 8s steps(1,end) 0s 1 normal both}@-webkit-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-moz-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-ms-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-o-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}
</style>
<noscript>
<style amp-boilerplate>
body{-webkit-animation:none;-moz-animation:none;-ms-animation:none;animation:none}
</style>
</noscript>
<!-- CAN MODIFY SCHEMA CONTENTS BELOW -->
<?php
//
?>
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "NewsArticle",
"mainEntityOfPage":{
"@type":"WebPage",
"@id":"/<?= $_SERVER['SERVER_NAME'];?>"
},
"headline": "Amp Page Maker",
"image": {
"@type": "ImageObject",
"url": "https://supiet2.tk/assets/imgs/jb-photo-696x1239.jpg",
"height": 696,
"width": 1239
},
"datePublished": "2017-03-07T20:56:27+07:00",
"dateModified": "<?php echo date('Y-m-d') .'T' .date('H:i:s') .'+07:00'; ?>",
"author": {
"@type": "Person",
"name": "John_Betong"
},
"publisher": {
"@type": "Organization",
"name": "Amp Page Maker",
"logo": {
"@type": "ImageObject",
"url": "https://www.johns-jokes.com/afiles/images/logo-180x60.png",
"width": 180,
"height": 60
}
},
"description": "The definitive AMP Page Maker"
}
</script>
<!-- CAN MODFY FOLLOWING LINKS and TITLE -->
<link rel="icon" href="https://www.amppagemaker.com/amp_favicon.png" type="image/x-icon"/>
<link rel="shortcut icon" href="https://www.amppagemaker.com/amp_favicon.png">
<link rel="shortcut icon" href="https://www.amppagemaker.com/amp_favicon.png" type="image/x-icon"/>
<link rel='canonical' href='https://www.amppagemaker.com/comps-create/10'>
<link rel='amphtml' href='https://www.amppagemaker.com/comps-create/10'>
<title> Comps-create </title>
<!-- SCRIPTS GENERATED DEPENDING ON BODY CONTENTS -->
<script async src="https://cdn.ampproject.org/v0.js"></script>
<link rel="yandex-tableau-widget" href="https://ampbyexample.com/favicons/yandex-browser-manifest.json">
<!-- EMBEDDED CSS STYLE SHEET -->
<style amp-custom>
<?php require 'test-style-000.css'; ?>
</style>