PHPackages                             magyarandras/amp-converter - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. magyarandras/amp-converter

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

magyarandras/amp-converter
==========================

A library to convert HTML articles, blog posts or similar content to AMP (Accelerated Mobile Pages).

v1.0.8(3y ago)65150.3k—9.8%9[1 PRs](https://github.com/magyarandras/amp-converter/pulls)MITPHP

Since May 25Pushed 3y ago5 watchersCompare

[ Source](https://github.com/magyarandras/amp-converter)[ Packagist](https://packagist.org/packages/magyarandras/amp-converter)[ RSS](/packages/magyarandras-amp-converter/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (3)Versions (10)Used By (0)

AMP ⚡ converter library
=======================

[](#amp--converter-library)

[![Build Status](https://github.com/magyarandras/amp-converter/workflows/test/badge.svg)](https://github.com/magyarandras/amp-converter/actions)

A library to convert HTML articles, blog posts or similar content to [AMP (Accelerated Mobile Pages)](https://amp.dev).

**Note**: This library is not intended to convert entire HTML documents if you want to convert an entire page you should use a more advanced library, for example: [Lullabot/amp-library](https://github.com/Lullabot/amp-library/)

Installation:
-------------

[](#installation)

```
composer require magyarandras/amp-converter

```

Currently supported elments:
----------------------------

[](#currently-supported-elments)

- amp-img
- amp-img in amp-pan-zoom
- amp-img with lightbox
- amp-video
- amp-audio
- amp-iframe(A placeholder is automatically added to the iframes, so you can [embed iframes even above the fold](https://www.youtube.com/watch?v=TqfYmlkHVCs).)
- amp-youtube
- amp-facebook
- amp-instagram
- amp-twitter
- amp-pinterest
- amp-playbuzz
- amp-gist(Github gist embed)
- amp-vimeo
- amp-soundcloud(You can use amp-iframe instead)
- amp-vk
- amp-imgur
- amp-dailymotion
- amp-gfycat

Usage:
------

[](#usage)

Simple example:

**Make sure your HTML code doesn't contain tags or attributes invalid in HTML5 otherwise, the generated AMP will be invalid too.**

```
