admin管理员组

文章数量:1293040

There are some WordPress plugins that allow custom crop offsets for specific thumbnails and images.

I want to do this programmatically in a theme as it inserts thumbnails with very specific crop offsets. Is there a hook (filter, action) that can be used to customize the actual crop offset beyond the corners, as in pixels?

There are some WordPress plugins that allow custom crop offsets for specific thumbnails and images.

I want to do this programmatically in a theme as it inserts thumbnails with very specific crop offsets. Is there a hook (filter, action) that can be used to customize the actual crop offset beyond the corners, as in pixels?

Share Improve this question asked May 6, 2021 at 14:59 strarsisstrarsis 1032 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 0

The add_image_size function allows you to add custom image sizes with custom offsets:

https://developer.wordpress/reference/functions/add_image_size/

本文标签: Custom thumbnail crop offsets