2
votes

I have a image field in a controller rendering(ImageCtrl) and data source template for it. In Experience Editor the ImageCtrl is added and assigned to a new data source. I click on the image placeholder, the media library opens and I upload one new picture from my PC. Then I save the page and publish from Experience Editor.

The image I've upload is not published under Media library so the image is not displayed. As I know this functionality is not supported out of the box by Sitecore.

The Sitecore solution is integrated with C# MVC.

Is their a way to catch the publish from Experience Editor and publish the images? How can I do this publish so the content editor won't need to go to media library to and publish the images?

EDIT: This is how sitecore databases look after publish:

Web Image Datasource http://prntscr.com/aa8eyn Web Media Library http://prntscr.com/aa8f7h

Master Image Datasource http://prntscr.com/aa8g31 Master Media Library http://prntscr.com/aa8gae

The C# view looks like this: http://prntscr.com/aa8hid

The imagefield is a subitem of the datasource of a subitem of the page.

1
I've done that but it doesn't publish it as well. Is there some configuration that should be implemented?Radu
How you reference the datasource item for the controller rendering?Vlad Iobagiu
@SitecoreClimber yes in the datasource the image path is changed in the master database. In the web database the datasource the image field doesn't have the new image.Radu
what is Core Image Datasource? did you put images in Core DB?Vlad Iobagiu
@SitecoreClimber sorry it was web and master databases not core and master.Radu

1 Answers

2
votes

I tried to add a new picture and publish in Habitat solution and is working OOTB.

You have to choose Publish Related items like on picture attached.

enter image description here