Plugin Example for Uploading an image

Post Reply
bbyrdhouse
Ssr. Bludit
Posts: 16
Joined: Sun Mar 08, 2020 1:36 am

I was thinking of building a plugin that allowed users to upload an image that would be used to customize certain portions of the theme. However, after looking around, I do not see any other plugins that allow a user to upload images that the theme would utilize.

Example:
I want to allow the user to use a custom image for a banner or background. So I would need a plugin that lets the user select an image with the proper dimensions and name and upload it to a designated folder.

Does something like this already exist or is there a hook that I can use to build such a plugin?
SamBrishes
Master Bludit
Posts: 106
Joined: Tue Dec 25, 2018 8:07 pm
Been thanked: 3 times

Hellow,

I developed a Plugin called "Designer", which extends Bludit's theme environment. It allows the theme developer to provide some options (including to upload images, used in the theme) and define menu positions, where the user can create his own navigation.

The plugin is in an early alpha stage and is currently not maintained, since I'm working on some other stuff. The last update is also over a year ago :D

However, my solution was the use of Bludit's own AJAX function, so the image upload completely happens on the JavaScript-side. You can check out the code directly on GitHub.

Sincerely,
Sam.
Post Reply