This is a package to convert regular html <img>
tags to those obligated by Google-Amp <amp-img>
.
This package is tested with ckeditor.
Via Composer
$ composer require artka54/ampify:1.0.1
use artka54\ampify\Ampify as Ampify;
$Ampify = new Ampify($htmlToConvert);
$Ampified = $Ampify->ampifyImgs();
WARNING: Your img must contain src, style(indicating width and height) and alt (can be empty) attributes. E.g a properly formatted img tag that can be successfuly converted with this package:
<img alt="here is the alt" src="http://example.com/blahblah.png" style="height:599px; width:900px">
Please see CHANGELOG for more information on what has changed recently.
If you discover any security related issues, please email artka54@gmail.com instead of using the issue tracker.
The MIT License (MIT). Please see License File for more information.