Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
mwdesigner opened this issue Jan 30, 2015 · 5 comments
Open

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

mwdesigner opened this issue Jan 30, 2015 · 5 comments

Comments

@mwdesigner
Copy link

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
Copy link
Author

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

@mwdesigner
Copy link
Author

Any ideas?

@tubalmartin
Copy link
Owner

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

@mwdesigner
Copy link
Author

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.

@tubalmartin
Copy link
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants