Download the PHP package teners/laravel-link-preview without Composer
On this page you can find all versions of the php package teners/laravel-link-preview. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download teners/laravel-link-preview
More information about teners/laravel-link-preview
Files in teners/laravel-link-preview
Package laravel-link-preview
Short Description A Laravel package for extracting link previews with customizable parsers, and caching support
License MIT
Homepage https://github.com/Teners-net/laravel-link-preview#readme
Informations about the package laravel-link-preview
Laravel Link Preview
A powerful and flexible Laravel package for extracting rich link previews with customizable parsers, intelligent caching, and support for Twitter/X, YouTube, and more. - Some use cases
Features
- Smart Platform Detection - Automatically detects and handles Twitter/X, YouTube, Vimeo, and generic HTML
- Flexible Caching - Database or Laravel cache system with configurable expiration
- Highly Configurable - Extensive configuration options for timeouts, redirects, SSL verification
- Mobile-Optimized - Smart user agent handling for better compatibility
- Extensible Architecture - Easy to add custom parsers for new platforms
- Rich Metadata - Extracts titles, descriptions, images, videos, authors, and more
- Auto-Pruning - Automatic cleanup of expired cached entries
The package automatically detects different platforms and uses specialized parsers:
- Twitter/X - Enhanced metadata extraction with fallback mechanisms
- Generic HTML - Open Graph, Twitter Cards, and standard HTML meta tags
- YouTube/Vimeo - Video-specific metadata (coming soon)
Installation
To install Laravel Link Preview via composer, run the following command in your terminal:
Publish the package configuration file
Run migrations to create the cache table (if using model-based caching):
Usage
Using the Built-in Route
The package includes a convenient route for AJAX requests:
Configuration
The package provides extensive configuration options in config/link-preview.php
:
Contributions
Contributions are welcome via Pull Requests on Github.
- Please document any change you made as neccesary in the README.md.
- Follow PSR-12 coding standards
- Write tests for new features
- Update documentation for any changes
- Make one pull request per feature/fix
- Ensure all tests pass
Roadmap Items (Help Wanted!)
- Add Other Parsers to extrack videos
- YouTube parser
- Vimeo parser implementation
- JavaScript/Puppeteer reader for dynamic content
- Image size validation and quality checks
- Global CDN cache option
- Instagram parser
- LinkedIn parser
Issues
Please report any issue you encounter in using the package through the Github Issues tab.
When reporting issues, please include:
- Laravel version
- PHP version
- Package version
- Code example
- Error messages
Testing
Credits
Contributors list will be added here
License
The MIT License (MIT). Please see License File for more information.
Made with ❤️ by Teners - if this package helped you ⭐ Star us on GitHub