Results 1 to 5 of 5

Thread: How to include image resources in build

  1. #1
    Sencha User
    Join Date
    Apr 2012
    Posts
    1

    Default How to include image resources in build

    I've created an architect project that uses a static image in a panel. I placed the image file (a png called logo.png) in the root folder of the architect application (call it c:\app). I included the image in my panel using the Ext.img element from the toolbox. In the 'src' field of the element, I just referred to the image as logo.png.

    Running the app in preview mode works fine and the image shows up. When I build it, however, it looks like the image file was not copied into the build folder anywhere in the tree and the link is then broken in the built version.

    Can someone please explain how to insert static resources like images in an Architect 4.x project and have the build system copy them over into the build folder with the correct url reference. I can't find this info anywhere in the documentation.

  2. #2
    Sencha User
    Join Date
    Jun 2016
    Posts
    12

    Default

    Hi atriolo!

    You need to create "resources" folder in the root folder. Images should be stored there. Then, you need to to set src of image component to resources/image.png. More informations about resources available here: http://docs.sencha.com/cmd/6.5.1/gui...ent_-_app_json
    Regards
    Jan Turon

  3. #3
    Sencha User
    Join Date
    May 2010
    Posts
    151
    Answers
    3

    Default

    I can't get this to work.. Do I need to add a reference to the image from Architect somehow or what else beside putting the images in the resources/ folder?

    (.js-scripts in that folder gets copied during the build process)

  4. #4
    Sencha User
    Join Date
    Oct 2017
    Posts
    54

    Default

    @atriolo I have the same problem, did you manage to find the reason and the solution?
    Copying it manually solves the problem, but I don't want to copy it on each build! There should be a reason behind this..

  5. #5
    Sencha User
    Join Date
    May 2010
    Posts
    151
    Answers
    3

    Default

    I have the same problem, did anyone fins any solution?

Similar Threads

  1. Include external resources in build
    By A. Llorente in forum Ext JS 6.x Q&A
    Replies: 1
    Last Post: 1 Jun 2016, 1:30 PM
  2. Replies: 3
    Last Post: 20 May 2015, 2:18 PM
  3. Replies: 0
    Last Post: 9 Apr 2014, 10:38 AM
  4. Replies: 0
    Last Post: 26 Feb 2013, 5:16 PM
  5. Replies: 5
    Last Post: 16 Mar 2012, 5:47 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •