Upload images to server from Google Chrome - html

I've uploaded some images on a java server where I save their path in my database and the actual images in the path "/src/main/resources/static/image-uploads/*.img".
When I'm trying to load at the same time the images they seem to appear as broken (that tiny image).
However if I restart my server they seem to be able to load.
When I inspect element I can see the correct path in the src tag of html (I even copied it by adding the C:/users/.../ prefix and I can see the image).
I've read some possible solutions like opening Google Chrome with disable extensions flag but none of them worked. I've also tried to change the path to an absolute path but the problem still persists.
Any suggestions?

Related

Truly undownloadable images

I had given up on protecting online images since even disabling the easiest ways to get at images still left people the option to use Inspect, then Sources, and poke around in the folders until they found the right file, hey, presto.
The only real way to get around that was to break the image up into tons of fragments so you're just depending on people not being able to code and getting bored with the idea of putting the image back together.
This site, however, has a public domain image that has somehow truly blocked the Inspect hack: The image appears within Inspect (d7... folder, 3rd image) but any attempt to open or download that image just produces useless "download" files instead of the actual image. How'd they pull that off? and why isn't it more common? How expensive/time consuming would it be to implement for online image databases?
The image appears within Inspect (d7... folder, 3rd image) but any attempt to open or download that image just produces useless "download" files instead of the actual image.
I managed to download it (using qutebrowser) by opening in new tab. The filename was qwe_download.
When i opened the image in my file manager (Thunar), it showed as WebP image.
I used feh (image viewer) and it was exactly the image.
Maybe use WebP compatible image viewer to open the file.

Heroku Nodejs Server img file keep getting 404

background: url('img/edu2.jpg') center center no-repeat scroll;
This image is working fine in localhost. When I deploy it to Github and Heroku automatically deploys it. However, Heroku keeps showing me that it cannot GET this image, and server responded with a status of 404.
So what should I do?
In Google Chrome (similar in other browsers): Right-Click on the image, Inspect. Under the elements tab, you can see on the right frame (Styles) all the CSS styles. Scroll down to the background and check what image path it actually takes (absolute address). You can see the absolute address by hovering over the relative one (or right click, open in new tab). Then, check if this is correct (what it is obviously not).
The problem is, that img/edu2.jpg is relative to the path of the HTML file. If you add a / to the beginning, it will take the root of the website as its relative base.
This very well may be an issue of relative paths. The first step is to discover what URL your browser is trying to fetch the resource at by looking at the console in your browser's developer tools. It would be very helpful if you linked the website that's facing this error as well as the source code behind it so that it's possible for outsiders to debug it.

images not showing up when webpage published

So I seem to be having a strange problem. When I open up my HTML pages locally, everything shows up and everything works. However, once I uploaded them to the server for my website only two of the images show up.
All of my images are in the same folder as all of my HTML pages and there are still a few images that work. Is this an issue with my image paths? Or is it something with my host since some of the images will load?
Here is the URL for my webpage: clepert.jomc-class.org
Must be a problem with images path since there a not on the server at the path that you wrote.
Maybe you didn't put them on the server or there has been a problem during the transfer. Check if they are on the server.
I got this for your background: Failed to load resource: the server responded with a status of 404 (Not Found). http://clepert.jomc-class.org/bckgrnd.jpg
So I would check for this file specifically on your server.
Otherwise your logo is a white image on a white background... so it won't show without a colored background.
The easiest way to solve such things is to check the browsers Developer-Tools and take a look at the console or network section (different from browser to browser).
You're getting an 404-Error so maybe the path is wrong, or the image is just not on your server.
Just because the browser gets a 404 back doesn't mean the file isn't there. It might be that the user / server doesn't have permission to access the file (not everyone uses the 401 status code).
Check the logs! They will save you LOTS of time.
Check the permissions of the directory and all other files you're
trying to access.
Make sure your paths are correct (local vs absolute, etc).
Post more details if that doesn't help.
Check the logs again.

Website images links work locally but not on server

I have a website that has many thumbnail images on it with links to bigger images for each one.
These fullsize images work offline, but when I upload them to the server they will just keep loading.
If I attempt to see the image directly it gives me a 404 error.
This is the website here: www.weissidian.com
What the image looks like when i attempt to go to it:
I'm not sure why it would be doing this.
Thanks before hand.
It looks like you didn't specify the URL correctly. The URLs are case-sentitive on your server and are case-insensitive on your computer.
For instance with http://weissidian.com/core/img/gallery/fullsize/digital/Shepard.jpg you are linking to the directory digital which doesn't exists. (I guessed because there is no Forbidden message.) When I try Digital (notice the uppercase D) it works fine.

Firefox not loading certain background images when served via Apache, no matter what I try

I have a really simple piece of CSS which is applying a background image to <li> elements
.icon-facebook { background: url("./images/icon_facebook.png") no-repeat; }
This works fine when I view it locally, without a web server, i.e. by double-clicking the .html file.
But as soon as I serve the same page via Apache - whether on localhost or a production server - the background images disappear.
Other background images on the page work fine - and all have identical (relative) paths.
Specifying an absolute path to the background-images does not work either.
Renaming the files did not work.
The images can be displayed just fine if navigated to directly in the browser.
Monitoring Apache's access log, the browser doesn't even attempt to request the images (!), even if an absolute URL is supplied in the CSS.
When I inspect the <li> Firebug says "could not load the given URL" but when I copy and paste the background-image URL straight from the CSS in Firebug into a new tab - guess what? It works.
I have a <div> on the same page with a different background image from the same folder which works just fine. When I replace its filename with one of my "problem" files I notice it isn't displayed any more.
The images in question are 20x20px PNGs (but I tried JPGs too).
All other browsers work fine.
This is truly driving me crazy.
Unbelievable. Truly unbelievable.
The culprit was Adblock Plus, which I had installed on Firefox but not any other browser. It was interpreting the names and/or class names of the background images as being either advertisements or social media annoyances, and therefore silently blocking them.
I had previously added my production domain to its white list, but when it changed I forgot to update it.
That explains why some image filenames worked (e.g. icon_f.png whereas others - icon_fb.png or icon_facebook.png - did not).
Let this be a lesson - do not run any kind of addons on your development browser.
I was ready to cry... and think I will now. Cry for my stupidity.
Thank you to all for your input.
Specifically, the culprit is Fanboy's Social Blocking List, which is one of the filter subscriptions included in Adblock Plus. It has already caused me a lot of distress in the past.
To disable it, click on the Adblock Plus toolbar button and choose Open filter preferences. You'll then find the list of subscriptions and you can simply unsubscribe to that one.
It's better than disabling Adblock Plus completely so you can continue using it for what it was originally intended: blocking ads.