path to image

General discussion about netjukebox
Locked
unsec
User
Posts: 36
Joined: Sat May 02, 2009 10:56 am

path to image

Post by unsec »

can you show me a right path to use in <img src="">? Image (f.ex. image.jpg) is located in album directory. thnks
User avatar
wbartels
netjukebox developer
Posts: 881
Joined: Thu Nov 04, 2004 3:12 pm
Location: Netherlands
Contact:

Re: path to image

Post by wbartels »

The relative image source files can be found in the database:
bitmap > image_front
bitmap > image_back
To get the complete path use: $cfg['media_dir'] with the above found relative file.

But it is better to use the resampled image like:

Code: Select all

<img src="image.php?image_id=<?php echo $album['image_id']; ?>" alt="" width="200" height="200">
Where the image_id can also be found in the bitmap database.
unsec
User
Posts: 36
Joined: Sat May 02, 2009 10:56 am

Re: path to image

Post by unsec »

I know this procedure but it's not good for me to extrack a right path.

In the album directory I located sub-directory named "gallery" with some images related to album (in author directory I located "gallery" with images related to author). So I want to show this images but I need a right links.
* to gallery related to author links -> media_dir/author/gallery/image1.jpg
* to gallery related to album links -> media_dir/author/album/gallery/image1.jpg

I used links started with media_dir but it show me only blank, not images (wrong link structure).
So i'm asking you about a right link structure couse from this code what you show me I can't extract link to use.

brgs
User avatar
wbartels
netjukebox developer
Posts: 881
Joined: Thu Nov 04, 2004 3:12 pm
Location: Netherlands
Contact:

Re: path to image

Post by wbartels »

unsec wrote: I used links started with media_dir but it show me only blank, not images (wrong link structure).
So i'm asking you about a right link structure couse from this code what you show me I can't extract link to use.

brgs
The example above with $cfg['media_dir'] are local files and are not accessible from a url!
I use the image.php script to make these files accessible from a url.
You could look at the image.php script how this is done.
Locked