This is a weird problem.
I link to image and it redirects to "404".
The path is absolutely right, and I've even clicked the image file from directory listing.
Could there be a conflict with wordpress term/taxonomy/variable names?
Here is the code where define the path to the image:
$player_code .= "image: \"".get_template_directory_uri()."/images/netti_tv_kuva.jpg\",\n";
My permalink structure is following:
/%postname%/
get_template_directory_uri() means it's looking in domain.com/wp-content/themes/themename ...
Is everything else working on your site with that theme?
Yes, that's the form of the URL and everything else is working too so it really makes crazy in it's random nature.
What path is it spittnig out on the webpage?
The path follow this pattern:
http://domain.com/wp-content/themes/themename/images/netti_tv_kuva.jpg
And if you put that in the browser, it works?
That path worked and on another occasion with another file it did not, but the problem is now "solved", I mean it has not occured anymore. It might have been something temporarily on the server side eg. apache redirect or cache, but hopefully I won't run in to it in the future.
Thank you for the responses.