Introduction
Before knowing exactly how to code things to make them work, a conceptual introduction is necessary before using any type of addon. That being said, understanding at a broad level how Image Core works is important before considering how to specifically code it's functions.
What is Image Core?
Image Core, as said above is an FW Addon, whose goal is to integrate images into the app. Since the normal FW API does not allow for images, and to make things easier for the end developer, every aspect of saving and rendering images is abstracted out into this addon, so ideally, all that needs to happen is all that a developer needs to do is properly setup Image Core in his app, and call its functions and then it will deal with all the details with how to make it work.
Generally, Image Core will be used on the client side rather than the serverside, though for certain functions of the app there is a way to do it through the server side.
How does it work, conceptually?
To boil down how image core works is that it takes an image file, uploaded by an app, and saves it as a base64 encoded string to the database, with other pertinent information for rendering it. It saves to the database so that it might be able to work across multiple servers using the same database (if it just saved to the server, as it used to, then it would only be able to be accessed from the server that uploaded it, and not any backup servers in the event of a server outage).
Then, to render the image back, Image Core allows the end user to simply append the AID from the image table to the images.php assets file, so it is also painless to retrieve the image from the database. This images.php render file takes all the pertinent data, which has been saved to the database and simply returns the rendered image. This is minimal work on the server and database, but works the easiest for everyone.
Parts of this documentation
Because of the relative simplicity of this app (it only technically does one thing - handle images), there are only three parts to this documentation.
-
Uploading Images This part of the documentation takes you through everything you need to know about how to setup an app to upload the image through the Image Core addon.
-
Displaying Images As one might expect, this part of the documentation takes you carefully through everything that it takes to display the image from the database, having the id. Essentially how to turn the imageAID into the actual full-blown picture.
-
Deleting Images Of course, the only other thing that is required is discussing how to delete images, having no more need for them.