× If you expect answers you should describe your problem and give as much information's as possible. (SQL-Structure, Template Code, Joomla Version ...) Please read this before posting: joodb.feenders.de/support.html

Images stored in DB?

More
11 years 2 months ago - 11 years 2 months ago #1400 by GuiGuy
Images stored in DB? was created by GuiGuy
I'm sure this has been asked before, but I absolutely need to be able to display images stored in the database table.

Is JooDatabase able to do that or is it limited to every image having to be uploaded to a directory?
Last edit: 11 years 2 months ago by joest.

Please Log in to join the conversation.

More
11 years 2 months ago #1402 by Dirk
Replied by Dirk on topic Re: Images stored in DB?
Even the free version is able to store and display additional images directly from the database. You need a blob type field.

But joodb does not check the file type or the size of the image. Also thumbnails will not be created automatically.
The following user(s) said Thank You: GuiGuy

Please Log in to join the conversation.

More
11 years 2 months ago #1403 by GuiGuy
Replied by GuiGuy on topic Re: Images stored in DB?

dirk wrote: But joodb does not check the file type or the size of the image. Also thumbnails will not be created automatically.


Thanks for the reply. Regarding the blob field requirement, that's understood.

I note that {joodb myimage}, when `myimage` is a valid jpg blob comes up blank. Is there something else that needs to be declared to have the field displayed?

PS: Actually, the compromise of transferring the images from the DB to a directory is not insurmountable.

Cheers

Please Log in to join the conversation.

More
11 years 2 months ago #1404 by GuiGuy
Replied by GuiGuy on topic SOLVED: Images stored in DB?
OK, I've caught up with the documents around the site and see that the most expedient way is to upload to a server directory.

Everything's working well.

Thanks

Please Log in to join the conversation.

More
11 years 2 months ago #1408 by Dirk
Replied by Dirk on topic Re: SOLVED: Images stored in DB?
Maybe that's a better way.

I changed the blob handling for the current version 1.5.6 a bit.
If you want to store images in the sql database you must have a blob or longblob field.

In your template you can insert the image in this way:
<img src="{joodb field|YOURIMAGEFIELD}" style="max-width: 320px; max-height: 280px;" alt="*">

YOURIMAGEFIELD is the name of your blob-field.

The pro version will have the opportunity to attach multiple images and files to your data soon.

Please Log in to join the conversation.

More
11 years 2 months ago #1412 by GuiGuy
Replied by GuiGuy on topic Re: SOLVED: Images stored in DB?
Many thanks, Dirk. It's working well. My only concern is the number of images. In this exercise we will ultimately have some 90,000 images linked across 25K records. I recall there used to be a limit on the total number of files in a directory. I've got an uneasy feeling that our host is still on EXT3 and the limit applies. Anyway, I'll worry about it if I hit that wall.

That aside, the project is coming along nicely, and joodb is responsive enough for what we need.

Cheers

Please Log in to join the conversation.

Moderators: Dirkjoest