The graphics for my jQueryUI date picker were not showing up; when I looked in the network trace I saw that I was getting a 404, but the image exists in my project but the path to the image in the trace was incorrect.
The ui-bg_flat_75_ffffff_40x100.png file is in ~/Content/themes/base/images and the jquery.ui.datepicker.css file is loaded. Looking in the css file it references the graphic url(images/ui-bg_flat_75_ffffff_40x100.png). The images folder is in the same folder as the css so the path looks correct to me. So why is it trying to find the file at /Content/images?
I am getting same issue as you when I deploy to production server which has IIS 6. But if I deploy to my local IIS, it works fine.
I did quick fix by copying the "iquery > images" to "content > images", but this is not a good fix.
If you find any other solution, please kindly share me.
Thanks.
Alin
Related
I have a bunch of images in a hidden gallery, only shown when a user clicks on a certain button.
On the development server, everything is fine, no errors or issues, but when I deploy my website and open the gallery the images don't show and throw a 404 error in the console (I included the required props).
When I replace the <Image/> component with <img>, everything is fine on the development server and live. Can anyone please help? I searched a lot and I didn't find anything like this issue.
My solution:
I had the same issue and solved it by renaming the image file names.
How the issue arose:
I had renamed the images, only changing uppercase to lowercase letters. This resulted in the files being wrongly named in my github repository. After a rename with new characters, the files were correctly updated on github.
Image Optimization using Next.js' default loader is not compatible with next export.
Possible solutions:
Use next start, which starts the Image Optimization API.
Use Vercel to deploy, which supports Image Optimization.
Configure a third-party loader in next.config.js.
That means: Only assets that are in the public directory at build time will be served by Next.js. Files added at runtime won't be available
To solve this problem. I just used next-optimized-images for static image and next/image for images from the cloud.
Kindly read this article for more understanding: https://dev.to/jameswallis/next-image-and-next-optimized-images-a-brief-comparison-4c4i
Create a folder on root call it 'static' which is bassically /static/imagename.png
Set the source to the image like so;
<img src="/static/imagename.png" />
This should load the static image in file both in dev environment and build file.
Trying to use Dev Tools Persist. Had a lot of trouble adding folder but eventually that worked. Folder is faded out and I can't "Map to File System Resource" (right click only shows this:
I tried using the "show editor in console" experiment (here and here) as a workaround but could never find it, despite enabling experiments.
I'm using dev off the live site. I don't control the site so don't have access to local files. I only need to update styles.
thanks!
Had the same problem, missing "Map to File System Resource". When my source maps included sourcesContent, the file mappings were automatically made and I could live edit my scss. Apparently chrome uses the content to find the right file.
node-sass --source-map-contents
I add a style sheet file to my project for customized style sheets. this file is in this path: ~/Content/MyStyle.css
When I run my project this file exists in the browser but there isn't any code in it.
Even I append my codes to Site.css file, those codes are wrote by mvc as default are exist, but those codes I added is not exist.
I'm confused. I wrote some code but not appear in browser.
Can you help me?
thanks
This is most likely a caching issue. You have to hard-refresh your browser. Try pressing ctrl+shift+R or ctrl+F5.
This will make sure that your modified files are requested from the server.
You can also change caching settings for your local development environment. Refer to MSDN on how to make a web.debug.config config transformation and what settings to change.
I've recently deployed a project on Heroku and fixed most asset pipeline issues such that my stylesheets and javascript files work. However, I have one line of code in a css file that I thought would work based on documentation and other stackoverflow topics:
background-image: image-url("giphy.gif");
I got that line directly from another stackoverflow solution, given that my original code was simply url("giphy.gif"). Loading the page with either code gives me a 404 in the console. The project is structured like a rails app, so the app->assets folder has:
images
giphy.gif
stylesheets
javascript.
I've tried asset-url, image-url, url, "images/giphy.gif", "giphy.gif". Many iterations have been tried. I figure this should be a simple switch, but I'm not sure what I'm missing. Would appreciate all assistance! Thanks
Update:
Error message: GET https://herokuappname.herokuapp.com/assets/giphy.gif 404 (Not Found)
I even tried just moving the gif so that it lies in the assets folder instead of the images subfolder.
Try background-image: url('giphy.gif');
Background images declared in CSS must be in a .css.erb file, application.css.erb, for example.
I've found this syntax works:
background-image:url('<%= asset_path("giphy.gif") %> ');
But again, it must be in an .erb file in order to properly reference the asset pipeline.
Good luck.
Have you tried manually
heroku run rake assets:precompile
Then pushing again?
Is your master branch on git up to date? Have you pushed to git git push origin master, then git push heroku master
Just listing some things I would try
On Local host,my solution works fine but on server when i deploy ,it gives that file not found error. and the error message is something like this.http://localhost:27375/favicon.ico
I don't have any such file in my application.I tried to create on in the root folder but no luck.any help is highly appreciated
Your favicon.ico file should be in your root directory for the web site.
It looks like your application is still trying to connect to the localhost in order to display the favicon. Are you hard-coding your URL to the favicon with a http://localhost:27275/favico.ico address?
To build on what Internet Engineer said, using ASP.NET, you can use a relative path prefaced with ~ or /. So, you can use ~/favico.ico or /favico.ico in order to reference your icon file.
First check in web server if you can see the file directly in the browser:
http://productionwebsite/favico.ico
If the file is there, now you need to check that the code is using relative paths. Most likely this is coded using absolute paths.