Beschrijving
Mosne Hero
Beschrijving
This plugin extends the core/cover block with separate mobile and desktop background images and sizes.
This increases the performance of the website by loading the smaller image on mobile devices and scores better in the Core Web Vitals.
Configuration
- In the Settings > Mosne Hero page you can configure the mobile image size and the breakpoint at which the mobile image is displayed
- Note that this is a new size, so you will need to regenerate the thumbnails using a plugin like Regenerate Thumbnails for existing images to use the new sizes.
In the Editor
- Add a cover block and select the “Hero Cover (Mobile & Desktop)” variation.
- Now you can see a new panel with the following options:
- Mobile image : You can also select a custom image for the desktop and the mobile view.
- Mobile image size : choose the size that perfectly fits your design.
- Focal point : You can also select a focal point for the mobile image.
- Alt text : Add alternative text for the mobile image. (Leave empty if it is a decorative image)
- High fetch priority : force the high fetch priority attribute if the image is above the fold.
- If you use a featured image, leave the mobile image empty and the plugin will use the mobile size for the featured image for the mobile view.
Key Features
- Separate mobile and desktop background images and sizes
- Configure the mobile image size and the breakpoint at which the mobile image is displayed
- It also works with the featured image
- Focal point switching for the mobile image
- Alt text switching for the mobile image
- High fetch priority for the mobile image
- Performance-optimized and lightweight
- No block library required
- Primarily built with native WordPress components
Limitations
- The mobile image is not displayed in the block editor
- Video background is not supported
- Repeated background is not supported
- Parallax background is not supported
Stay Connected
Schermafbeeldingen
Installatie
This section describes how to install the plugin and get it working.
- Upload the plugin files to the
/wp-content/plugins/mosne-herodirectory, or install the plugin through the WordPress plugins screen directly. - Activate the plugin through the ‘Plugins’ screen in WordPress.
FAQ
Can I use hooks to configure the plugin?
Yes, you can use hooks to configure the plugin.
add_filter( 'mosne_hero_enable_image_size', '__return_false' ); add_filter( 'mosne_hero_mobile_width', 'your_function' ); add_filter( 'mosne_hero_mobile_retina_width', 'your_function' ); add_filter( 'mosne_hero_mobile_height', 'your_function' ); add_filter( 'mosne_hero_mobile_retina_height', 'your_function' ); add_filter( 'mosne_hero_crop', 'your_function' ); add_filter( 'mosne_hero_breakpoint', 'your_function' ); add_filter( 'mosne_hero_settings', 'your_function' );- This will disable the image size registration.
- This will return the mobile width and the mobile retina width.
- This will return the mobile height and the mobile retina height.
- This will return the crop option.
- This will return the breakpoint.
- This will return the settings.
Beoordelingen
Er zijn geen beoordelingen voor deze plugin.
Bijdragers & ontwikkelaars
“Mosne Hero” is open source software. De volgende personen hebben bijgedragen aan deze plugin.
BijdragersVertaal “Mosne Hero” in je eigen taal.
Interesse in ontwikkeling?
Bekijk de code, haal de SVN repository op, of abonneer je op het ontwikkellog via RSS.
Changelog
0.1.1
- Public Release
0.1.0
- First Release









