Skip to content

Enable filtering mime output by image size#25

Closed
adamsilverstein wants to merge 8 commits intoadd/webp-uploadsfrom
add/webp-uploads-filter-by-size
Closed

Enable filtering mime output by image size#25
adamsilverstein wants to merge 8 commits intoadd/webp-uploadsfrom
add/webp-uploads-filter-by-size

Conversation

@adamsilverstein
Copy link
Copy Markdown
Owner

  • Add a size name parameter to the wp_upload_image_mime_transforms filter and apply during image sub-size generation
  • Enables opting in/out of mime type generation for specific sizes (by size name)

@adamsilverstein
Copy link
Copy Markdown
Owner Author

Note: needs additional tests to validate filtering with size works as expected

@adamsilverstein
Copy link
Copy Markdown
Owner Author

I created this mirror Draft PR against trunk to run tests: WordPress#2933

@felixarntz
Copy link
Copy Markdown

@adamsilverstein Is this PR still relevant? To me this looks like a previous attempt/approach to control MIME type availability by size, but in https://make.wordpress.org/core/2022/06/30/plan-for-adding-webp-multiple-mime-support-for-images/ we now proposed to go a different route. Also see my review on WordPress#2393 (review) (I think we should incorporate that there since it is a crucial piece of the functionality that therefore should be committed together).

@adamsilverstein
Copy link
Copy Markdown
Owner Author

I think we should incorporate that there since it is a crucial piece of the functionality that therefore should be committed together

Good point, this is outdated anyway. I'll close this out and add the functionality in the main PR.

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.

3 participants