• Dear all

    I’d like to add images which are located in a Media Library Folder (managed by the great “Media Library Folders for WordPress” from Max Foundry). Doing it via the button “Add to MaxGalleria Gallery” in the Media Library Folder plugin is working fine.

    However, I’m wondering if there is also a way to add images from a Media Library Folder via the MaxGallery post edit form. Well there is, but adding images from such a folder creates duplicates in the upload directory of the current month. Am I doing something wrong or is this the normal behavior?

    Additionally, I’m wondering if it is somehow possible to assign an individual folder per gallery? That’s the idea behind: When adding a new, not yet in Media Library present image to the gallery, the image is added to this folder and not the one of the current month. How do you feel about this idea?

    Best regards
    Christian

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author AlanP57

    (@alanp57)

    Christian,

    The way MaxGalleria works, is that galleries are a custom post type and are stored in the posts table. Attachments, are the post types of items in the media library. These are also stored in the post table. When an image is added to a MaxGalleria gallery, the ID of the gallery it belongs to is inserted in the attachment’s post_parent field. This means that an image can only be added to one gallery and when an image is added to a second gallery, it is necessary to generate a copy of the image and a new attachment record.

    We had some complaints from users two years ago about these duplicate images so we came up with a solution. When an image is added to a second gallery, instead of making a copy of the image, MaxGalleria only creates a second record in the posts table that point to the same image as the as the first record. We also modified the query used to populate the media library not to show these duplicate records. Now some plugins will not function with the modified query so it can be turned off. When the modified query is not in use, there appears to be duplicate images in the Media Library, but these are actually the same image.

    I tried adding an existing gallery image to a gallery in both Media Library Folders and MaxGalleria. In both cases, no duplicate image was created.

    Thread Starter Christian Frick

    (@christian-frick)

    Hi Alan

    Thanks for your elaborated answer. It seems like the attachment post in the database was corrupt (I actually played around with it before I experienced the described problems).

    It all works well now. Sorry, my bad.

    Can you please also address the idea about the individually assigned folder to which newly added images would be added to?

    Best regards
    Christian

    Plugin Author AlanP57

    (@alanp57)

    “address the idea about the individually assigned folder to which newly added images would be added to?”

    Would this be in regard to having images in a folder show up in a gallery automatically?

    Thread Starter Christian Frick

    (@christian-frick)

    Hi Alan
    Sorry for my late answer. It’s currently almost too nice weather in Switzerland to spend time working on websites during leisure time ?? But let’s focus on the idea I had.

    Afaik images are uploaded to default folders if you add non-existing images to a gallery. It’s possible to add images from another folder to a gallery via the “Media Library Folders” (MLF) plugin.

    Well what I thought is: Let’s have the option to assign a folder which is managed via the MLF plugin to a gallery. If a non-existing image is added to the gallery via the gallery edit form, it is saved in this specific folder instead of the default folder of WP Media Library.

    It’s not about adding all images which are present in this folder automatically to the gallery.

    What is your opinion? Would this make sense and is it something what you could implement in near future?

    Best regards
    Christian

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Adding images from a Media Library Folder’ is closed to new replies.