isapp/tinyeditor-picture-tag
<img> tags).<img> to <picture> with srcset, improving performance and accessibility.<img> tags (standard behavior). No changes needed to TinyMCE’s setup.picture tag configurations (e.g., breakpoints, image sources) in a central location (e.g., config/tinymce.php or a service provider).<img> tags with custom attributes (e.g., data-*, class) may not be fully supported.<img> tags from non-TinyMCE sources) could cause partial transformations or errors.picture tag configurations (e.g., breakpoints, fallbacks) be stored? How will they be versioned and shared across environments?<img> tags, missing Spatie Media Library)? Should the package gracefully degrade or log errors?<img> tags, malformed HTML) be handled?<img> tags if needed (e.g., during debugging or if the package is deprecated)?<img> tags (default behavior). No plugin modifications required.transform() or getUrl()).<picture> tags. May require polyfills for legacy support.<img> tags (default).composer require isapp/tinyeditor-picture-tag
picture tag settings in a service provider:
TinyEditorPictureTag::configure([
'breakpoints' => [320, 768, 1200],
'fallback' => 'img', // or 'picture'
'sources' => [
['media' => '(max-width: 767px)', 'srcset' => 'path-to-mobile'],
['media' => '(min-width: 768px)', 'srcset' => 'path-to-desktop'],
],
]);
Post, Article) in a service provider’s boot() method:
TinyEditorPictureTag::observe([Post::class, Article::class]);
<img> tags, and non-TinyMCE content.content or similar field storing TinyMCE HTML.tinyeditor-picture-tag package.picture tag configurations (e.g., breakpoints) based on analytics.isapp/tinyeditor-picture-tag and Spatie Media Library.picture tag configurations to avoid inconsistencies across environments.<picture> tag edits.Blade or a CDN) to reduce observer load.try-catch block and log errors without halting execution.picture tags reference invalid image URLs.<img> tags are incorrectly processed.<picture> tags due to incorrect breakpoints/sources.How can I help you explore Laravel packages today?