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

relative path to local images is not working #11

Closed
JulioCVaz opened this issue May 28, 2019 · 3 comments
Closed

relative path to local images is not working #11

JulioCVaz opened this issue May 28, 2019 · 3 comments

Comments

@JulioCVaz
Copy link

Hi.

Congratulations for the tool!! Is so amazing.

I'm with problem. Relative path to local images is not working.

Exemple:

new hoverEffect({
parent: document.querySelector('.ticket'),
intensity1: 0.1,
intensity2: 0.1,
// angle2: Math.PI / 2,
image1: "../images/balloon.jpg",

I imported the lib imagesloaded, but not working. Only function with images uploaded from websites.

@robin-dela
Copy link
Owner

robin-dela commented May 28, 2019

Hi,

You need to run a local server to access the images, you can do that by running this command: python -m SimpleHTTPServer 8000 or installing http-server

@JulioCVaz
Copy link
Author

Ok, thanks!

@HeuSalander
Copy link

HeuSalander commented Dec 20, 2019

Hello Robin great work with this lib.

Im having the same problem with the images not showing up, im running node js and it gives me a local server and everything but images still don't showing up, it only works with images from other servers.

I don't know what im missing

new hoverEffect({ parent: document.querySelector('.imagewrapper'), intensity: 0.3, image1: './img_two.jpg', image2: './img_one.jpg', displacementImage: './4.png' });

I don't know if it is my package json config

"scripts": {
"dev": "parcel src/index.html",
"prod": "parcel build src/index.html"
},

Thx for any help!

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

3 participants