artka54 / ampify
Convert your IMG tags to google-amp supported amp-img
1.0.1
2017-08-21 18:09 UTC
Requires
- php: ~5.6|~7.0
Requires (Dev)
- phpunit/phpunit: >=5.4.3
- squizlabs/php_codesniffer: ^2.3
This package is not auto-updated.
Last update: 2024-11-10 04:53:27 UTC
README
This is a package to convert regular html <img>
tags to those obligated by Google-Amp <amp-img>
.
This package is tested with ckeditor.
Install
Via Composer
$ composer require artka54/ampify:1.0.1
Usage
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">
Change log
Please see CHANGELOG for more information on what has changed recently.
Security
If you discover any security related issues, please email artka54@gmail.com instead of using the issue tracker.
Credits
License
The MIT License (MIT). Please see License File for more information.