riloadr icon indicating copy to clipboard operation
riloadr copied to clipboard

Is it possible to only load images above a certain breakpoint?

Open mwdesigner opened this issue 10 years ago • 5 comments

Hi,

Is it possible to use riloadr in a scenario where you load no image for mobile and just, for example 768px and above? This does appear to work in a quick test, just having the one breakpoint, but obvisouly displays a failed image path / icon below this width.

This can be cleared up with a bit of a hack using it alongside display: none; in the css to hide the broken image graphic, but just wondered if there was a neater way to achieve this?

My only thoughts at the moment are possibly using a 1px spacer image, so that a full path is displayed, but there may be a suggested / correct way to achieve this.

Thanks in advance.

mwdesigner avatar Jan 30 '15 12:01 mwdesigner

Any ideas / suggestions for tackling the above approach would be much appreciated. Thanks again in advance.

mwdesigner avatar Feb 02 '15 09:02 mwdesigner

Any ideas?

mwdesigner avatar Feb 04 '15 12:02 mwdesigner

At the moment, using a 1px spacer image is your best option. I may implement this as a new feature.

tubalmartin avatar Feb 05 '15 10:02 tubalmartin

Thanks for the reply. How do I get around this using the plugin when the images need the same name? It's for a large project so not easy to make up lots of spacer images of the same name. Ideally just using the one spacer gif for all.

Thanks again. It's a great plug in and just want to make sure I can continue to use it to work in this way too if possible.

mwdesigner avatar Feb 05 '15 19:02 mwdesigner

In that case I'd take a look at https://github.com/tubalmartin/riloadr#feature-unpredictable so you can define a breakpoint to use one spacer gif for all of the images.

tubalmartin avatar Feb 08 '15 23:02 tubalmartin