5.13.3 • Published 3 years ago

@mentor-medier/resizer-image-block v5.13.3

Weekly downloads
300
License
CC-BY-NC-ND-4.0
Repository
github
Last release
3 years ago

@wpmedia/resizer-image-block

This is a helper to transform the return value of the content sources. This is specifically to make sure that resized image urls are available at themes' blocks.json widths.

Acceptance Criteria

  • Add AC relevant to the block

Props

PropRequiredTypeDescription
required propyes
optional propno
contentConfig examplePlease specify which content sources are compatible

ANS Schema

Outline any schema information requirements necessary to know for ths block

ANS Fields

  • n/a

Internationalization fields

Phrase keyDefault (English)
keyenglish translation

Events

Blocks can emit events. The following is a list of events that are emitted by this block.

Event NameDescription
eventNameDescribe the event

Event Listening

Include block specific instructions for event listening.

Additional Considerations

Usage

import source from '@arc-core-components/content-source_story-feed_sections-v4';
import getResizedImageData from '@wpmedia/resizer-image-block';
export default {
  resolve: source.resolve,
  schemaName: source.schemaName,
  params: source.params,
  transform: (data) => getResizedImageData(data),
};

blocks.json:

"values": {
    "default": {
      "siteProperties": {
        ...
        "imageWidths": [
          158,
          274
        ],
        "aspectRatios": [
          "1.85:1",
          "3:2",
          "4:3"
        ],
        ...
5.13.2

3 years ago

5.13.3

3 years ago

5.11.3

3 years ago

5.11.2

3 years ago

5.10.4

3 years ago

5.10.2

3 years ago

5.10.0

3 years ago

5.9.15

3 years ago