![]() It's important to choose suitable size for your picture, without making it pixelated but having appropriate weight.įlotiq automatically scale images and save them for future, faster use, if the size requested by the user does not yet exist. Worth to know is that this endpoint won't upscale images.Īs we can see below weight follows sizes, the smaller the size, the less weight. When the image is taller or wider, it will crop it. 1920x1920 This will force images size to choosen by you.0x1920 This way let you to force height defined by you and width will be scaled to a proportionate size.1920x0 This will force width defined by you and height will be scaled to a proportionate size.0x0 This way let you download original pictures size and won't make any differents.Set the appropriate values width and height in the media url x/_media-123.jpg, for example: You can choose different sizes and depend of them, you get other results. The extension must match the original extension of the uploaded file. Image/1920x0/_media-5472384.jpg will choose a photo with a width of 1920px and a proportional height of id _media-5472384, the file will be JPG. To download the original photo, or download a non-photo file as width and height,Įnter 0, e.g. Width and height are the dimensions of the scaled photo and key is its id and extension. Structure of the _media Content Type Definition: image/0x0/_media-456456.jpg)Īll the Media Content Object parameters are described also in the Media Content Type Definition. Url to original image without API host (e.g. Id of the photo on unsplash if it was downloaded from there Source of the file, it can be 'disk' or 'unsplash' Type of the file, it can be 'image' or 'file' The id property is unique, final and immutable and is used to create the URI of the uploaded object. The id is given by the backend by which the file on the disk is named. Be aware, that changing the _media metadata can lead to unexpected behaviour.īelow we listed all parameters describing the Media object. You can use all the contentĪpi methods to get, list, remove Content objects. Media Content Object ¶Īs we see in the response uploaded media has its own representation as Content Object. Are you using WordPress for a headless set-up, using the WP REST API And would you like to use the Yoast SEO plugin just like you would for any other. To get list of images with metadata use GET /api/v1/content/_media endpoint.įetching original or resized files directly is described in the next sections. Your files are accessible also via REST API like other Content Objects. Now you can see uploaded images in the media library. Use Next.js, Typescript and OpenAPI with Flotiq content Use Netlify, Zapier and Gatsby to instantly deploy your Flotiq content Migrating Flotiq data to and from MS Excel Migrate content from Contentful to Flotiq Importing data from Gatsby starter to Flotiq Starting new project with Gatsby and Flotiq
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |