SaaS CMS has officially launched! Learn more now.

Solution assets images not visible


Hi, I am working on migration from CMS 11 to 12. I had pages confugured with thumbnails - images in the solution.
I had copied them to the new .net6/cms12 solution, set `CopyToOutputDirectory` to Always.

File is there in build result, path seems to be ok, but the image is not shown. 

Is there any additional config required now? Can't find anything in cms 11 solution nor in google 🔎

Jun 30, 2023 12:57

You can place the images in the wwwroot directly with the correct path and they should be picked up

Jun 30, 2023 14:07

David's answer is the correct answer.  It's a .NET Core architectural change and not an Optimizely specific thing.  Any static file served by a .NET Core site must be placed under the wwwroot folder in the root of the web project.   Wwwroot/assets/img/thumbnails/standard page.png will be served as /assets/img/thumbnails/standard page.png.

All of your JS and CSS files for your site will also need to move under wwwroot.

As a side note, check out the Geta.Optimizely.ContentTypeIcons package. It uses font awesome to render icons for content types and you can provide colours for the tiles in line with client branding.  It supports both the icons in the content tree as well as those for the tiles you see in the content type selector.  Not my package, but it fits this usage very nicely.

Jul 01, 2023 8:01

That works, thank you! _+1_ I knew there will be something trivial :D 
Maybe you have an idea, why the thumbnails appears in a gray scale now?

(there are colors in the menu, not like the whole page is gray :D)

Edited, Jul 03, 2023 6:00

I think it's a design choice in CMS 12. Not sure why, but it's grey now 

Jul 03, 2023 11:51

I thought I'd try and reproduce the grey scale image on CMS 12.21.0 and it's coming through in colour for me:

Jul 03, 2023 13:41

The grey comes from .epi-browserWindowContent img class. So Mark it seems like you have one or two errors ;) (maybe)

Jul 03, 2023 14:12
Mark Stott - Jul 05, 2023 22:04
Tried in 12.22.0 and I still get a full colour image, I don't see any grayscale(x) in the style sheets. Perhaps the design that changed later on? Have you set up a custom style sheet for the CMS or added a plugin that does? I've been using one to make things like Block Properties and IList components look more like a single cohesive control, but nothing that affects the preview tiles.

Could be cached css or something in my local browser when running in debug mode perhaps. I can check later :)

Jul 03, 2023 16:38

Regarding the grey icon type, I stand corrected - it is indeed a bug caused by Commerce (i.e. only if you install Commerce you see that).

Lesson learned: when you see something all the time, you will think it's normal when it is not.

Bug is COM-17358 (not yet public, but soon will be). I set priority to 1 (second highest) so it hopefully will be fixed soon 

Oct 10, 2023 10:17

Said bug is now fixed and will be released in the next Commerce release

Nov 29, 2023 9:53
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.