1.0.2-0 • Published 2 years ago

strapi-format-image-url v1.0.2-0

Weekly downloads
-
License
ISC
Repository
-
Last release
2 years ago

Requirements

Strapi v4 is required.

Installation

Download

yarn add strapi-format-image-url

or

npm i strapi-format-image-url

Usage Example

const strapiFormatImageUrl = require("strapi-format-image-url");

module.exports = createCoreService("api::country.country", {
 async findOne(ctx) {
  let country = super.findOne(ctx)
  country.Flag = strapiFormatImageUrl.formatStrapiImage(country.Flag, "url");
  country.Flag = strapiFormatImageUrl.formatStrapiImage(country.Flag, "medium");
  country.Flag = strapiFormatImageUrl.formatStrapiImage(country.Flag, "thumbnail");
 }
});
1.0.2-0

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago