\n
The staging environment is giving the following type of data under every image format, which doesn't include any url, which is not required and there is no way to access the image of any particular format through this.
\n\n","author":{"@type":"Person","name":"NavneetKaur0111"},"upvoteCount":1,"answerCount":2,"acceptedAnswer":null}}Reputation: 147
I have a project deployed to heroku, and when both the local branch and the heroku have the same code, they still are returning different types of data for the image formats. The differences are explained below:
The local branch has the following format of data, where every format has a url that can be used to access the image.
The staging environment is giving the following type of data under every image format, which doesn't include any url, which is not required and there is no way to access the image of any particular format through this.
Upvotes: 1
Views: 1314
Reputation: 431
The question is old, but maybe is usefull for someone. You should ask the url during your request from server. Here is example
const apiAddrss = "/api/your-api-address?locale=your-languge-if-applicable&filters[title-or-slug][$eq]=if-you-want-use-title-or-slug&populate=*,your-requested-component-if-your-requested-page-include-component,other-component,component-that-includes-photo.name-of-sub-component-if-applicable&populate=maincomponent-that-has-photo.sub-component-that-has-photo.name-of-phot-component"
Upvotes: 0
Reputation: 329
If you have set the (Settings > Media Library >) Responsive friendly upload to true
before uploading the image it will create the formats for you. The formats (and the settings for it) are stored in the database. Try cloning the database from one environment to the other together with the local uploads folder (probably you want something like S3 to store the images for you).
Upvotes: 2