When I run the web-application from Visual Studio 2017, the pictures are appear correctly.the path of image is like
/media/1713/mypicture.png
But after publishing the web-application, the pictures do not show.
There are too many pictures in the media folder in the project and I need to call them from the database with umbraco. So the media folder is not included.
you need to include the images, on visual studio there is the option to show all files, click on it and you'll be able to see all files in the media folder, include all images, once that's done publish your app and check the media folder to make sure it is including the files, hopefully I'm making sense
Thank you for your this solution but i think this is not true way beacuse there are a lot of images (i guess 500-600). I need a general solution for it.
what are you trying to achieve? somehow the files need to be added to the published app, otherwise even if the db is serving the correct url it wont be able to find the file, have you check on your browser dev tools to see why is it not displaying the images?
You can include the folder and all files recursively via editing the project file, in the same way Umbraco includes the CMS.
Find the build folder within the Umbraco package (...\Umbraco\packages\UmbracoCms.7.12.2\build)
and take a look at the props and target files.
In the target file note
why the images dont show?
When I run the web-application from Visual Studio 2017, the pictures are appear correctly.the path of image is like
/media/1713/mypicture.png
But after publishing the web-application, the pictures do not show.
There are too many pictures in the media folder in the project and I need to call them from the database with umbraco. So the media folder is not included.
Need i to set up my website for media urls?
Hi diojen,
can you see the images on the media folder in your published app?
No i can't. Images not included. But it is working my local.
This is my ftp and media file:
it have a web.config file and it is in writing this:
you need to include the images, on visual studio there is the option to show all files, click on it and you'll be able to see all files in the media folder, include all images, once that's done publish your app and check the media folder to make sure it is including the files, hopefully I'm making sense
Thank you for your this solution but i think this is not true way beacuse there are a lot of images (i guess 500-600). I need a general solution for it.
what are you trying to achieve? somehow the files need to be added to the published app, otherwise even if the db is serving the correct url it wont be able to find the file, have you check on your browser dev tools to see why is it not displaying the images?
You are right. I can do what you say. I just wanted to know if there's another way to do that. I want to make sure it's the right way.
If there is no other way, of course I will. And it will work as you say.
I will write the results, thank you Alex
Hi diojen,
no worries Kind regards Alex
Hi diojen,
You can include the folder and all files recursively via editing the project file, in the same way Umbraco includes the CMS.
Find the build folder within the Umbraco package (...\Umbraco\packages\UmbracoCms.7.12.2\build) and take a look at the props and target files. In the target file note
and the prop file is fairly standard, create a local copy and rename them concentrating on the AddUmbracoFilesToOutput within the prop file.
if you look in your project file you can see
this is towards the bottom of the file.
You can imitate this and test it and you can get the Media file to publish to output and any other extra files required.
I can show you a working copy of this if you need (however it is on another PC so it will be later today)
Jamie
Thank you jamie, this is a knowledge that will certainly benefit from my works, but I will solve my problem.
And thank you Alex, you were right. My problem is solved.
is working on a reply...