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

Create default thumbs on all image assets #793

Merged
merged 4 commits into from
Apr 11, 2024

Conversation

JackLewis-digirati
Copy link
Contributor

@JackLewis-digirati JackLewis-digirati commented Apr 10, 2024

Resolves #627
Links wdc-39
This PR adds "unofficial thumbs" to every iiif-image request, so that even if the the thumbs channel is not specified, there will still be thumbnails generated for use by the DLCS.

The thumbnails that will be ultimately generated for an image, is a union of the unofficial thumbs, with the delivery channel policy of the thumbs channel, so that duplicate thumbnails are not created

However, these specific thumbnails will not be advertised to the customer, but will show up on a info.json request under the sizes property.

@JackLewis-digirati JackLewis-digirati marked this pull request as ready for review April 11, 2024 09:32
@JackLewis-digirati JackLewis-digirati requested a review from a team as a code owner April 11, 2024 09:32
@JackLewis-digirati
Copy link
Contributor Author

did have a question on this, which was whether to add the setting to appsettings.json - don't think this is likely to change between environments

}

// temporary - will be replaced by call to application metadata table
var thumbs = await thumbRepository.GetAllSizes(i.Id);
Copy link
Member

Choose a reason for hiding this comment

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

I think this changes behaviour, previously it was only returning open thumbs.

Not worth changing now - as comment says this is temporary. However, we'll need to bear in mind we want open thumbs only, not all. GetThumbnailSizesForImage is what was called in all instances and that calls AssetX.GetAvailableThumbSizes() which will return available sizes only

Copy link
Contributor Author

@JackLewis-digirati JackLewis-digirati Apr 11, 2024

Choose a reason for hiding this comment

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

Given I was making changes in the area, I did just change this to GetOpenSizes - though might need to look into some safeguarding with this change if all thumbs are auth

@JackLewis-digirati JackLewis-digirati merged commit 4956c24 into develop Apr 11, 2024
9 checks passed
@JackLewis-digirati JackLewis-digirati deleted the feature/unnofficialThumbs branch April 11, 2024 14:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Create "unofficial" thumbs even when no thumbs channel specified
2 participants