Wordpress - Managing media in bespoke plugin

I have built a wordpress plugin that stores information about products. It uses its own bespoke tables. The idea is that this acts as a master product list and I am using wordpress as a simple CRUD for now.

We want to start uploading photos to be linked to the products we have added and I am wondering what is the best way to go about this.

Rather than building an upload tool in the plugin, I was thinking of simply using the media library to upload the images and then linking the image to the product.

Does anyone have some insights as to the best way to go about this?


This was relatively easy to solve. I create a reference table and simply linked product ID's to media files. If anyone wants code samples, let me know.

Tags: Wordpress

Similar questions

Wordpress plugin for managing/tracking mp3... say for a band site?
Working on a blog for a friend of mine that wants an easy way to upload / manage and get stats on tracks being played. (the last, the stats, being less important) just an easy way to upload tracks, maybe group them into a CD/Playlist. Anything like this for WP, our should I build my own.
HTML/Wordpress plugin to help content managing
I am not sure if this is the place to ask but i wanna build a restaurant site for a friend, However he wants to himself be able to change the menu around if in a years time it changes etc, In WordPress is there an easy plugin which allows you to do that? Or does it have to be done manually? For example if there is an easy content managing system ou...
Good plugin for managing outbound links?
I've looked around and around for a good WordPress plugin. I know this is a shopping question, but such an important aspect of managing your WordPress blog, I'm surprised to find that there isn't a more standard selection. Specifically, I need a plugin to help with: What do you use?
Is there a capability for managing plugin options?
I have an Editor user that I want to let use a plugin's options without being an Administrator. I can use $user->add_cap but can't tell if any particular capability relates to the permission to edit plugin options. The plugin in question is Redirection, if that makes a difference.
Managing WP Core & Plugin Updates for Clients
I'd like to know how you go about managing WP Core & Plugin updates for clients? It's a service my web company would like to start offering but we are unsure of the best solution. Let me provide some details: By default we disable automatic updates in WP. We are looking for a solution which fits within our workflow and wonder if anyone else use...
WP: writing an admin plugin for managing custom content
A client of mine has a site in wordpress, with one section being a directory of agents that each have different text and videos associated with them. The client wants to be able to easily add/remove/change these agents from within the wordpress admin interface. There will be anywhere from 50-75 of these agents, so doing each page manually is not ve...

Also ask

We use cookies to deliver the best possible experience on our website. By continuing to use this site, accepting or closing this box, you consent to our use of cookies. To learn more, visit our privacy policy.