#Netlify Deployment issue

9 messages · Page 1 of 1 (latest)

civic merlin
#

Hi, I'm deploying this Netflix clone and i notice that all are the images are not working but it is working locally just fine so i changed the path from "/images/..." to "../../images" and it should work with this path but it doesnot either.... so I imported the image first then use it in the src and it worked but idk why it is not working it is the same path.
Now in my containers/jumbotron iam getting the images path from an obj and i can not figure to make it work. i tried to save the path in a variable and change the path to "../../ but nothing works this_is_fine
repo : https://github.com/MohamedZakidev/Netflix-Clone

GitHub

Netflix clone. Contribute to MohamedZakidev/Netflix-Clone development by creating an account on GitHub.

civic merlin
civic merlin
#

@snow mirage i guess i need a little help here my friend blobnomcookie

ruby surge
#

Hi Zaki! Nice work on the Netflix clone!

As far as your images working fine in dev but not on deploy, it's how vite bundles. If you are importing the image as If it were JS, vite understands that it is considered important and gets bundled along with the code. To provide a relative path instead of an import, the images directory needs to go in the public directory but it looks like the public directory has been deleted.

If it's done with the public directory, then you can reference the path to the image as if it were in the same directory... pretty much the first way you were doing it with /images/ but not ../../images. The second way will cause it to break. This should explain it better than I can lol https://vitejs.dev/guide/assets#the-public-directory.

Also, just so you are aware, there have been others that have posted clones of other sites to netlify. The sites usually get pulled down by netlify and they cancel or block the user's account. They do that because of it being a potential phishing scam. The users usually don't get access back to their account.

snow mirage
civic merlin
#

What about varcel? Will they cancel the site?

civic merlin
snow mirage
# civic merlin What about varcel? Will they cancel the site?

I am not too sure. It is a bit silly to ban people for this in my opinion, just shut down the server and want the user, this all can be automated 🤷
It is especially silly, because the urls are always random unless you pay for it, but if you pay for a domain and try to clone YT I am pretty sure you can get sued by google 😅

ruby surge
# civic merlin What about varcel? Will they cancel the site?

To be honest, I'm not very sure. The only reason I say that netlify is doing that, is because users that have reported blocked accounts and removed sites all had one thing in common... clones of big websites. They are basically kicked out of netlify for "suspicious activity" as the message goes, but aren'ttold exactly why and get no response from them about it. Glad you got it working though!