kevinweber / lazy-load-for-videos

Speed up your site by replacing embedded Youtube and Vimeo videos with a clickable preview image. Free WordPress plugin.
http://wordpress.org/plugins/lazy-load-for-videos/
GNU General Public License v3.0
41 stars 23 forks source link

Lazy load for videos disables embed block size e.g. wide width or full width in Gutenberg Editor #49

Closed mtoensing closed 4 years ago

mtoensing commented 4 years ago

The latest version of this plugin makes the block size button disappear in Gutenberg:

Without the plugin activated:

Screen Shot 2020-09-14 at 21 59 03

Lazy load is activated and the button for the block size is missing.

Screen Shot 2020-09-14 at 21 59 24

WordPress 5.5.1 Theme: Twenty Nineteen

mtoensing commented 4 years ago

@kevinweber Any idea how long this will take to fix? Or is this behavior indented?

kevinweber commented 4 years ago

Hi @mtoensing, thanks for reporting this! This is an issue and I'm stuck on getting this working properly. I spent time yesterday trying to fix it but haven't found a satisfying solution yet… I pushed my changes to the master branch; feel free to use those files in the meantime but no guarantee that this will make it to an official WordPress release anytime soon: https://github.com/kevinweber/lazy-load-for-videos/tree/5d887f99a9ac78fb503dde7bd487c60deb08c378 The full-width option seems to be working well. Unfortunately, the other alignment options don't. As soon as you choose "Align left", the video doesn't properly resize and it overflows after videos weirdly once you save the post and reload the editor page. The latter issue is what concerns me most and is the reason why I don't want to publish this change yet. (The issues are only related to the editor experience; the final post for the end user looks just fine.)

Contributions are welcome 🙏

kevinweber commented 4 years ago

@mtoensing I just published my change as v2.11.2. The full width alignment works fine now, and left/right-aligned videos should look fine for your readers as well. However, the left/right alignment is buggy in the editor and I don't have a fix for it and I don't plan on supporting left/right alignment anytime soon. Those who want to use it will need to live with the editor-flaws. Because the videos should look fine to your readers despite the flaws, this shouldn't be too much of an issue but let me know in case you think otherwise.

mtoensing commented 4 years ago

Solution is fine for me. Thank you!