-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
srcset support #42
Comments
Featherlight does not do anything in particular with regard to this. WordPress core creates the images and the links to images, we simply handle whatever they provide. |
@robneu: The plugin generates HTML without When the image is shown in Lightbox with a specific width, e.g. full width of viewport, echo wp_get_attachment_image($attachment_id, 'full', false, array('sizes' => '100vw')); In case the Lightbox CSS adds a margin or padding, this can also be easily taken into account, e.g.: echo wp_get_attachment_image($attachment_id, 'full', false, array('sizes' => 'calc(100vw - 20px)')); Breakpoints are also possible, but the Lightbox layout looks very simple from mobile to desktop. This will dramatically improve loading time and bandwidth usage. https://make.wordpress.org/core/2015/11/10/responsive-images-in-wordpress-4-4/ |
The plugin does not generate HTML, it handles what is output by WordPress core, themes, and other plugins. Any HTML generated is created by the Featherlight script as it copies existing markup into its lightbox area. If you can find some area of the script that needs improvement, I'll review any pull request you submit but I'm not sure what we would need to do in this situation because we're not actually interacting with WP at all other than to enqueue some JS. |
Thank you for the clarification. |
This plugin should correctly add the native attachment/image markup -
or at least provide a srcset and sizes.
Currently the image of maximum available size is used which causes
incredible load times and bandwith usage.
The text was updated successfully, but these errors were encountered: