I decided to make an application that displays data on vacancies of different companies. Jobs I get in json. I decided to make a separate section, where there will be a list of companies with their name and pictures. I wrote a script in which I got all this, by parsing the necessary resources.

How should I better organize the storage of these images so that they were originally in the application, and not that they had to parse while working? There are almost one and a half thousand pictures in total about 10 MB.

    1 answer 1

    Create a handler that will match the picture of the corresponding company and display it in your activations, and store the pictures themselves in the application resources.

    For example: You have resources with pictures under the names, for example, 0001.png, 0002.png, etc., and your script gives the json application a substitute external link to the picture of the company with a link to your picture file, something like

    [{"company_pic":"http:\/\/companyname.ru\/ui\/upload\/01fc8bca9852de248af358fb043a6f9e.png",...}] 

    replace with

      [{"company_pic":"0001.png",...}] 

    Next, parse json in your application with local links.