How get can get media in repeateble component in dynamic zone

System Information
  • Strapi Version:
  • Operating System:
  • Database:
  • Node Version:
  • NPM Version:
  • Yarn Version:

Hi, everyone, i trying get media from my repeatable compoenent in dynamic zone. show image below.

Page schema:

Page controller:

module.exports = createCoreController("api::page.page", ({ strapi }) => ({
  async find(ctx) {
    const { query } = ctx;

    const entity = await strapi.entityService.findMany("api::page.page", {
      ...query,
      populate: {
        header: { populate: "*" },
        blocks: {
          // blocks in dynamic zone
          hero: { populate: "*" },
          company: { populate: "*" },
          anchor: { populate: "*" },
          product: { populate: "*" },
          partners: {
            //repeatable component
            media_items: { populate: "*" }, // dont working
          },
          //
          populate: "*",
        },
      },
    });

    const sanitizedEntity = await this.sanitizeOutput(entity, ctx);

    return this.transformResponse(sanitizedEntity);
  },
}));

I gets only id and alt properties, can someone help with it? Idk how can deal that

Hey there :slight_smile:

First of all:
Sorry for not being very helpful to yourself - I just wanted to ask you how you managed to get those icons displayed for each component in the dynamic zone :open_mouth:

I’m searching for a simple solution a long time already and thought I might just ask…
I hope you can remember adn thank you for maybe being able to help me :+1:

Oh and I think it’s StrapiV4 on that screenshot, right?
In V3 it has been a feature… idk why it got removed