This may be a failure of symlink due to .jpg being a binary file. A .png file, linked to through Windows 7 symbolic links, cannot be opened by Windows Photo Viewer, Gimp, or Firefox through the symbolic link, whether you make that link using Perl and Win32::Symlink, or from the Cygwin command line, and whether you use absolute or relative paths. This may be some bizarre Windows protection problem, although links to text files made in the same way have no problem, and the "diff" command indicates no difference between the .png and the symlink to it.
This, for example, links link.png to graph.png, but you can't open the PNG through link.png:
require Win32::Symlink;
Win32::Symlink->import();
use warnings;
use strict;
use Cwd;
my $cwd = getcwd;
my $a = 'stories/graph.png';
my $link = 'link.png';
unlink("$cwd/$link") if -e $link;
symlink("$cwd/$a", "$cwd/$link");
exit;
$diff link.png stories.graph.png
[no difference]
This also does not work:
ln -s stories/graph.png link.png
Nor this:
export pwd=`pwd`
ln -s $pwd/stories/graph.png $pwd/link.png
It appears to be a bug in how Windows 7 implements symlinks, having nothing to do with Perl. BUT, hard links DO work:
ln stories/graph.png link.png
produces a link that you can use. The 'symlink' command is supposed to be equivalent to "ln -s", which does not work.