Hi!
I use phoca gallery component several years and it is awesome! Thanks!
I display the gallery on my website (example) with jquery mosaic - it is cool plugin to display gallery. But I need to know width and height for every image. Now, I take it with with getimagesize, but I think that it is non optimal way. Can we store width and height for every image in DB? May be you can do it with next update, I hope it is fast and easy, but useful feature.
Need to store image size in DB
- KarEm
- Phoca Professional
- Posts: 154
- Joined: 20 Dec 2015, 21:25
Re: Need to store image size in DB
Hi,
just out of interest, for what purpose do you need, I suspect the values of the thumbs?
Regards
KarEm
just out of interest, for what purpose do you need, I suspect the values of the thumbs?
Regards
KarEm
- Jan
- Phoca Hero
- Posts: 47887
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: Need to store image size in DB
Another question, which size you need to know - size of the thumbnail or size of the original image?
The size of thumbnail is stored in database in columns: extw, exth:
where the ordering is large thumbnail, medium thumbnail, small thumbnail
The size of thumbnail is stored in database in columns: extw, exth:
where the ordering is large thumbnail, medium thumbnail, small thumbnail
If you find Phoca extensions useful, please support the project
- Matysh
- Phoca Newbie
- Posts: 5
- Joined: 17 Jan 2017, 15:20
Re: Need to store image size in DB
KarEm
1. For mosaic plugin (there is enough aspect ratio, so we need width and height to calculate it. In fact, size of thumbnails enough for it)
2. For photoswipe plugin we need attribute data-sizes for correct scaling.
It is only my reasons, I think there are many other cases for any big and complex website. F.e. to display original sizes for users.
Jan
I talk about size of original images.
1. For mosaic plugin (there is enough aspect ratio, so we need width and height to calculate it. In fact, size of thumbnails enough for it)
2. For photoswipe plugin we need attribute data-sizes for correct scaling.
It is only my reasons, I think there are many other cases for any big and complex website. F.e. to display original sizes for users.
Jan
I talk about size of original images.
- Matysh
- Phoca Newbie
- Posts: 5
- Joined: 17 Jan 2017, 15:20
Re: Need to store image size in DB
Jan
I don't know why, but for most images in my DB fields 'extw' and 'exth' is empty o_O.
I'm always add new images via Multiple add.
Update:
This fields stay filled after "recreate thumbnails" for this image.
I don't know why, but for most images in my DB fields 'extw' and 'exth' is empty o_O.
I'm always add new images via Multiple add.
Update:
This fields stay filled after "recreate thumbnails" for this image.
- Jan
- Phoca Hero
- Posts: 47887
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: Need to store image size in DB
Ok, maybe the images were added on your server before the function to store these values was introduced.
Jan
Jan
If you find Phoca extensions useful, please support the project