Forum > Layouts, HTML, CSS & Javascript > files/image.jpg links not working
Pages: 1
"files/image.jpg links not working", One week ago, 9:42 AM #1
Oh Yeah!
User avatar
Took me a while to figure this out, but abbreviated links to uploaded extra files that used to work just fine, aren't working any more, the images won't display.

For example, this link which used to show a banner image at the top of the comic page, now doesn't show the image:

<IMG SRC="files/yct-signature.jpg" alt="You Call That A Stick Figure Comic? webcomic by Derek Paterson" title="You Call That A Stick Figure Comic? webcomic by Derek Paterson">

To make the image display again, I had to edit the link to include the full URL:

<IMG SRC="http://yctasfc.thecomicseries.com/files/yct-signature.jpg" alt="You Call That A Stick Figure Comic? webcomic by Derek Paterson" title="You Call That A Stick Figure Comic? webcomic by Derek Paterson">

Other images on the comic page weren't showing either, it's not just the banner image, they all needed the full URLs.

I hadn't updated the comic since April so I hadn't been fiddling around with anything. It just looked funny and I realized the banner was missing and the little star images in the ratings panel were missing also. Full URLs needed before they would display.

I'm using latest level Firefox. Which I will admit can be iffy sometimes. Like, one day I can give a rating or post a comment + rating on a comic page, and the input box won't vanish after 3 seconds, I have to close it manually from the taskbar. Or sometimes the box will close itself as designed. Other days I'll look at a page and realize the fonts are default Times New Roman instead of the specified fonts the page should be showing. Firefox gives me other good things though so I've stuck with it and put up with its quirks instead of going to Chrome.

All I'm saying is maybe this is yet another Firefox quirk and not a ComicFury problem at all. But it is peculiar.
One week ago, 10:00 AM #2
Kyo
🐊
User avatar
Without having seen the page in question, I'm guessing this is just a matter of whether you access the extra page via http://yourcomic/extrapage or http://yourcomic/extrapage/ (with a trailing slash)


if you link a page or file and it doesn't start with a slash, it will use the current folder as a base for that link.

So if you're currently on http://yourcomic/extrapage, it will assume the current folder is just the actual root of the webcomic, and the link will work


if you're on http://yourcomic/extrapage/, with the extra slash, it will treat "/extrapage/" as the current folder, and assume the file you want is at http://yourcomic/extrapage/files/image.jpg rather than http://yourcomic/files/image.jpg. This behaviour is consistent accross all browsers.


So if you're doing relative URLs (which I do recommend), make sure they always start with a slash, and it will always point to the correct location, no matter what URL it's being viewed from.


tl;dr you need to change it from:

<IMG SRC="files/yct-signature.jpg">


to:

<IMG SRC="/files/yct-signature.jpg">


and it will work as expected
_______________________
hello
One week ago, 10:10 AM #3
Oh Yeah!
User avatar
Kyo:tl;dr you need to change it from:

<IMG SRC="files/yct-signature.jpg">


to:

<IMG SRC="/files/yct-signature.jpg">


and it will work as expected

I read it all, thanks, obviously I tried that right away and it worked, d'oh. So thanks for that.

Part of my brain is still whining about why files/image.jpg worked just fine before without the / in front of it, but decided to stop working now, but problem solved, so why belabor it? Cheers! I'll look through other comics and apply this also.
4 days ago, 5:02 PM #4
User avatar
Today I noticed the broken images too but on the Chrome app.

I'll try the suggestion to see if it works again.

*Edit*

Ok, reading carefully I realized mine is a different problem.

The images I'm referring to are actually the forum banner on signatures. And not only the banner of my signature isn't showing, but other user's signatures too.

Should I make a new thread?
_______________________
4 days ago, 6:01 PM #5
User avatar
Sometimes banner signatures might be turned off if your personal settings has "Use compact forum mode" enabled.

Check it here:
https://comicfury.com/changesettings.php
_______________________
Forum > Layouts, HTML, CSS & Javascript > files/image.jpg links not working
Pages: 1