• Hi, would it be possible to integrate this lazysizes inside tinymce, instead of parsing content during each load. I think that would increase TTFB.

    So when you add images tinymce automatically adds required tags, and while in preview Visual mode would display data-src as src, but before save would replace src with that base64 1px img.

    As well that would help avoiding regex. And for the content I think cli would be better or some cronjob, which would in the background scan for images and other tags which do not already have lazyload class and would update it and replace it with updated html.

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • I wouldn’t recommend saving lazysizes markup to database because it locks your content to lazysizes. In an event that you might have to migrate to a different solution in future, the current setup leaves no traces to original content.

    Saving markup to database can create very easily bugs where images are saved in wrong way or displayed wrong in either editor or front-end. If not with TinyMCE, then probably with Gutenberg.

    If the speed is the issue, page caching or other caching solutions should do the job although doing PHP regex is relatively very fast in any case.

    Plugin Author Patrick Sletvold

    (@16patsle)

    Hi and thanks for the suggestion. I don’t plan to support integration like this in the near future, though I might do so later if it proves to be not too much work. Generally, if you’re concerned about performance, a page caching plugin should remove most or all time cost of generating pages dynamically, including the processing done by this plugin.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Feature required’ is closed to new replies.