• Resolved do77

    (@do77)


    Hi,

    I have someone develop a custom plugin for a friend of mine. Its basically a mini-gallery for each post where you can add images from the media library to the mini-gallery via custom fields.

    Anyway, the point is that if I add an image to the mini-gallery, it always duplicates that image in the media library. So let’s say I have 10 images in the media library and I add four pictures to the mini-gallery, then I suddenly have 14 pictures in the media library.

    This seems quite odd to me so I asked the developer why that is. He then said:

    Each media can have only one post.
    Thats why if adding one image to post, the images in media also increase.
    This is the way WordPress works.

    Is that correct? I mean if I add an image to a post my media library has never been increasing so it sounds kind of weird to me.

    Hope someone can help me with that!

    Thanks a lot!
    do77

Viewing 6 replies - 1 through 6 (of 6 total)
  • esmi

    (@esmi)

    Is that correct?

    Yes. This is how the native WordPress Gallery works.

    Thread Starter do77

    (@do77)

    Mmhh … so I just created a post on another blog of mine. I opened the media library (396 images) and added one image to the post. After adding I opened the media library again and I still have 396 images. Why hasn’t it increased by +1 then?

    Understand me right esmi … I don’t want to say that I don’t believe you I just try to understand ??

    esmi

    (@esmi)

    If you simply insert images that are already in the Media Library, it will not increase. However, if you want to use anything based upon the native WordPress Gallery in posts or pages, you have to upload the relevant whilst editing the appropriate pats/page. Want to use the same image in another gallery? You have to upload it again.

    Thread Starter do77

    (@do77)

    But I only want to use images that are already in the media library. I choose an image from there, add it to the mini-gallery and that’s it. I mean the media library doesn’t increase when I add an image via a custom field.

    What do you exactly mean by ‘based upon the native WP Gallery’?

    esmi

    (@esmi)

    Thread Starter do77

    (@do77)

    Okay, I see how that works now! Thanks esmi.

    I am not so sure though if that is a great solution then. This will substantially increase the media library with each new post and thus use a lot of disk space.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Question regarding custom plugin’ is closed to new replies.