New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

strapi-format-image-url

Package Overview
Dependencies
Maintainers
3
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

strapi-format-image-url

This package will format the strapi image url based on the provided strapi image object.

latest
npmnpm
Version
1.0.2-0
Version published
Maintainers
3
Created
Source

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");
 }
});

Keywords

strapi

FAQs

Package last updated on 29 Dec 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts