Page 1 of 1

path to image

Posted: Mon Sep 23, 2013 12:09 pm
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

Re: path to image

Posted: Mon Sep 23, 2013 6:34 pm
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.

Re: path to image

Posted: Tue Sep 24, 2013 12:57 am
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

Re: path to image

Posted: Sat Nov 23, 2013 9:10 am
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.