How to show (custom) Thumbnails?

Heyho,

we try to get some Icons / Thumbnails / Images into our frontend. We save images publicly available into the Content Store. Means just a Get-Request is necessary for getting them via <baseUrl>/cs/<attachment_id>

We try to use the Attachment-Type in our DMs. We have a DataProvider which is creating a init document:

						return {
							RepetitionDays: meal.RepetitionDays,
							WeightFactor: meal.WeightFactor,
							Type: meal.Type,
							Logo: {
								attachment_id: "static_mealBreakfast",
								internal_filename: "internalFileName.svg",
								mime_type: "image/svg+xml"
							}
						};
					});

The Form-Engine is not showing any Thumbnails / Image what ever. I already dig into the code and saw that thumbnails are more used, but they will not be loaded in my use case and furthermore i could use the customSelector, but not quite sure if i can do a fetch.

Could some give me details how the attachment and thumbnail stuff works, especially when i want to show images. Is it even right using the Attachment-Type or should be do a custom implementation there ?

Happy regards,
Tjorben

Hi @tjorben-atomic-moss

I think you would need to provide your custom attachment loader.

Details can be found at docs

Hello @tjorben-atomic-moss , I am a member of the Discourse team. I can see that there was a new response to your question on the Topic of the discussion. Do you find it helpful, or should the question remain open?

Thanks ahead for your feedback and have a nice rest of the day!

Heyho,

tbh it was not really helping, because i tried to find out when a thumbnail will be loaded and not how. But we already saw that thumbnails is just not the correct feature to use for showing images. It is far easier to use an own component.

Happy regards,

Tjorben

Hello @tjorben-atomic-moss thanks for your honest feedback!
We try to propose a better answer the next time!