PHP code example of fronty / responsive-images

1. Go to this page and download the library: Download fronty/responsive-images library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

fronty / responsive-images example snippets



$sizes = img_sizes([
	0 => [400, 250], // 400x250px cropped image for viewport 0 - 575px
	576 => 500, // 500px wide, proportional height image for viewpoer 576 - 767px
	768 => 700, // ...
	992 => 900,
	1200 => 1100
]);
img_upload($attachment_id)->responsiveImgTag($sizes, ['class' => 'img-fluid', 'alt' => 'My image']);

// functions.php

// functions.php

R__ . '/responsive-images-master/src/Sizes/ImageSizeList.php');
nce(__DIR__ . '/responsive-images-master/src/UploadImage.php');