Download the PHP package rankletter/commonmark-ext-seo-image without Composer
On this page you can find all versions of the php package rankletter/commonmark-ext-seo-image. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download rankletter/commonmark-ext-seo-image
More information about rankletter/commonmark-ext-seo-image
Files in rankletter/commonmark-ext-seo-image
Package commonmark-ext-seo-image
Short Description Adds support for explicit width and height as well as lazy loading to the league/commonmark markdown parser package
License MIT
Homepage https://github.com/RankLetter/commonmark-ext-seo-image
Informations about the package commonmark-ext-seo-image
SEO Image Extension for league/commonmark
🚧️ This extension is work in progress. Until 1.0 is release breaking changes might happen. Use with caution.
This image extension for league/commonmark adds:
- the lazy loading attribute as well as
- explicit
height
andwidth
attributes to keep the layout shifts to a minimum. This works for both absolute URLs and local images.
The package is largely based on simonvomeyser/commonmark-ext-lazy-image! It is licensed under the same MIT license.
Install
Example
Assuming /path/to/image.jpg
points to an image with a size of 1024x512 pixels, the following example
This creates the following HTML
Further Options
Further options to replicate the lazy loading using JavaScript packages are supported. For more details please check the original package. This functionality will remain for now.