NO BUG: No "Media" post type in query loop

Hi there,

I’m looking to automate populating my front page, with images from other specific pages.
So, I’m firstly needing to set up the proper media query, to pull from the various folders I have set up in HappyFiles.
However, I have an issue where I am not seeing the option to select the “Media” post type.

I’m wanting to do something along these lines:
https://forum.bricksbuilder.io/t/bricks-and-happy-files-dynamically-load-category-in-gallery/6419

Hi @Mandrin,

I think you’ve selected the wrong dropdown in your screenshot. The “Type” should be “Posts”, and then the post type would be “Media”.

I hope that helps :slight_smile:

Hi Charaf,

Thanks for replying!

Ye, in my image above, the default (greyed out) was “Posts”, so I took that to mean the correct Type was set.
However, even if I do select the “Type” to be “Posts”. I still don’t see the option for “Media” post type:

Either I am doing something terribly stupid :slight_smile: , or there is a gremlin somewhere :slight_smile:

Hi @Mandrin,

Oh yeah sorry I missed it. That seems odd. Could it be the one named “Attachments” in your case? or is that a custom post type?

Oh my good grief!
Yup, selecting “Attachments” has “Mime Type” populated with a greyed out “image”, and when I select the relevant HappyFiles folder in “Terms (Include)”, the correct images appear.

Told you I was being stupid, as I have created a template for posts :slight_smile:

AMAZING assistance as always @charaf !!!

1 Like

Just another issue I’m having.
And I dunno if it’s because of the template I created, making me having “Attachments” instead of “Media”

When I try adding images in Bricks, for some reason, they are being embedded as svg’s, and don’t display on the front end.

Yet, when I build a page using Spectra/Gutenberg, images all load/display fine as webp… Except for the featured image, which while displaying fine in the front end, is also being rendered as an svg.

I’m glad that one is sorted :raised_hands:

Yeah, that’s strange that it’s being renamed and the images are being rendered as an SVG. Can you maybe try disabling all plugins and setting the mentioned template status to draft?

If the issue persists feel free to create a new forum thread with details of how to reproduce the bug, and you can also tag me there :slight_smile:

Ok cool.

I’ll do the run-through again and see if I missed anything.
If it persists, I’ll then create a new thread.

Thanks again!

@charaf ,

Found it, no need for a separate thread :wink:
The culprit is the Imagify plugin.
In its settings, if you set it to use tags, instead of .htaccess rewrite rules, then it will break the rendering of your images.

Here is one of the threads on their plugin support, about this exact issue:
Images missing when plugin is active | WordPress.org

And, from what I researched, Imagify behaves like this with a lot of webp convertor plugins and lazy loading features of Themes/Builders.

1 Like

Great to hear you found the root issue :slight_smile: