Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add image sizes to news images #22

Merged
merged 2 commits into from
Oct 7, 2024

Conversation

niccofyren
Copy link
Member

@niccofyren niccofyren commented Oct 7, 2024

Closes: #21

It follows this interface (if implementing please make sure it tackles const string fields being changed to enums over time)

interface ImageSize {
  url: string; // Absolute url
  width: number;
  height: number;
}

interface ImageData {
  id: number | string;
  title: string;
  alt: string; // For now just same as title/caption, but use where relevant
  url: string; // Absolute url to "large" size (always present, target size might change)
  type: 'foto';
  focus: 'center';
  author: null;
  sizes: {
    thumbnail: ImageSize;
    small: ImageSize;
    medium: ImageSize;
    large: ImageSize;
    'extra-large': ImageSize;
  };
}

@niccofyren niccofyren requested a review from a team as a code owner October 7, 2024 17:14
@niccofyren niccofyren requested review from ErikMekiassen and pr0xity and removed request for ErikMekiassen October 7, 2024 17:14
Copy link
Contributor

@pr0xity pr0xity left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image

@niccofyren niccofyren merged commit 4a85a72 into main Oct 7, 2024
8 checks passed
@niccofyren niccofyren deleted the feat/add-default-image-sizes branch October 7, 2024 17:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Include all relevant image sizes in news article responses
2 participants