1-888-365-2779
+1-888-365-2779
Try Now
More in this section

Forums / General Discussions / SF 4.1 does not server static images properly (404 error)

SF 4.1 does not server static images properly (404 error)

46 posts, 0 answered
  1. Will
    Will avatar
    23 posts
    Registered:
    30 Jun 2009
    25 Apr 2011
    Link to this post
    I'm still having issues so I opened a support ticket. Tihomir is walking me through the database and file permissions to see what the problem is. If I think it might be helpful to share the solution I'll post back when we figure it out. Thanks!
  2. Rick
    Rick avatar
    12 posts
    Registered:
    21 Sep 2007
    27 Apr 2011
    Link to this post
    I have tried this change  to the url root for image library to "imagelib" and my static images work. However, any existing library images work now. When viewing an album in the backend tools, the images appear as broken image links. If I right click a broken image link and view the image properties, the image url still contains the "images" root instead of "imagelib" as I was expecting. :(
  3. Rick
    Rick avatar
    12 posts
    Registered:
    21 Sep 2007
    27 Apr 2011
    Link to this post
    The solution that Phil suggested worked great for me. I've changed the root url for images in the Image Library from "images" to "imagelib" and ran the script he referenced here:

    http://www.sitefinity.com/devnet/kb/sitefinity-4-x/static-files-are-not-served-from-images-or-videos-folders.aspx

    Kudos Phil
  4. Georgi
    Georgi avatar
    3583 posts
    Registered:
    28 Oct 2016
    28 Apr 2011
    Link to this post
    Hey Rick,

    Thanks for the follow up. Perhaps everything worked after you restarted the application - we have to add this requirement to the KB article. 

    I am glad that you have it working. 

    All the best,
    Georgi
    the Telerik team

  5. Phill Hodgkinson
    Phill Hodgkinson avatar
    362 posts
    Registered:
    10 Nov 2004
    28 Apr 2011
    Link to this post
    @Rick, I'd just like to point out that credit should go to Georgi for this fix, not me ;) I only pointed you to the KB.
  6. thelyrist
    thelyrist avatar
    16 posts
    Registered:
    18 May 2007
    14 May 2011
    Link to this post
    the 4.1 sp1 doesn't fix this.  I changed the image url root as instructed but the images still cause 404 errors.
  7. Georgi
    Georgi avatar
    3583 posts
    Registered:
    28 Oct 2016
    16 May 2011
    Link to this post
    Hello Thelyrist,

    Have you restarted the application after the change in the settings, and running the code?
    Phil, the kudos is for pointing the right solution at the right time, to the right person :) 

    Kind regards,
    Georgi
    the Telerik team
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  8. Craig
    Craig avatar
    7 posts
    Registered:
    29 Apr 2009
    01 Jun 2011
    Link to this post
    Hi,
    I changed ~/Sitefinity/Administration/Settings/Advanced>Libraries>Images>UrlRoot to "imageslib" and restarted the application but the images are not showing up. All I see is a red x  and 404 when I preview. Am I missing something?
  9. Georgi
    Georgi avatar
    3583 posts
    Registered:
    28 Oct 2016
    02 Jun 2011
    Link to this post
    Hello Craig,

    Yes, there is a code that should be run, so that the new URLs are updated:

    var imagesFacade = App.WorkWith().Images();
    imagesFacade.ForEach(
            img =>
            {
                ((IContentManager)imagesFacade.GetManager()).RecompileItemUrls(img);
            }
        ).SaveChanges();

    Please check the KB for more information - http://www.sitefinity.com/devnet/kb/sitefinity-4-x/static-files-are-not-served-from-images-or-videos-folders.aspx

    Best wishes,
    Georgi
    the Telerik team
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  10. Craig
    Craig avatar
    7 posts
    Registered:
    29 Apr 2009
    02 Jun 2011
    Link to this post
    I deleted all the images prior to me making the change to imageslib. After the change I tried image upload again with no success.
  11. Georgi
    Georgi avatar
    3583 posts
    Registered:
    28 Oct 2016
    07 Jun 2011
    Link to this post
    Hi Craig,

    The Image Upload is not related to this problem. Here, we discuss the serving from a physical directory, named Images.

    Could you please post the exact error you are getting, and let us know if the problem is in Libraries, or in the Images from the file system?

    Kind regards,
    Georgi
    the Telerik team
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  12. Ishtiyaq
    Ishtiyaq avatar
    11 posts
    Registered:
    17 Sep 2011
    13 Oct 2011
    Link to this post
    I do have the same issue. I am unable to see the images after uploading to the library. When I preview the images got 404 error. I changes the images to imageslib. Help me to resolve this issues.
  13. Ishtiyaq
    Ishtiyaq avatar
    11 posts
    Registered:
    17 Sep 2011
    13 Oct 2011
    Link to this post
    Well it works fine on local with no issues but it wont on the other server.
  14. Steve
    Steve avatar
    3037 posts
    Registered:
    03 Dec 2008
    13 Oct 2011
    Link to this post
    @Ishtiyaq are you using the FileSystem provider to store them?
  15. Ishtiyaq
    Ishtiyaq avatar
    11 posts
    Registered:
    17 Sep 2011
    13 Oct 2011
    Link to this post
    I have attached the Files you clearly see why I am not having the images on another server with same settings. Well runs fine on Local and other server. But really don't why its not working. Please find the attachment and check what Exactly I need to do. I am using images module to upload the images.
  16. Ben
    Ben avatar
    35 posts
    Registered:
    24 Jan 2011
    05 Mar 2012
    Link to this post
    Even though this thread is old I wanted to add that the script on the knowledge-base article page does NOT fix/recompile image references inside content block controls in a sitefinity page. 

    Example:
    If I have a header image that was added with the sitefinity Image control, that WILL be fixed.
    If I have a static HTML reference to an image inside a SF content block control, it WILL NOT be fixed and all such references must be corrected manually.

    This was not immediately obvious after reading this thread and I thought might help someone in the future. 
46 posts, 0 answered
1 2