Closed robindevitt closed 2 years ago
AMF doesn’t do this because it can’t know if the external source has images with those exact dimensions that the theme is requesting, they can be added if the provider implements the resize interface e.g. https://github.com/humanmade/altis-media/blob/master/inc/global_assets/class-tachyon-provider.php
I would maybe look at why that file I linked above is failing to return the right URL for the size being requested
So the image URL's appear to be correct from the function resize
in this file https://github.com/humanmade/altis-media/blob/master/inc/global_assets/class-tachyon-provider.php .
*/tachyon/sites/2/2022/09/verticz-squencz-HAmKh06RZb0-unsplash.jpg?resize=150%2C150&crop_strategy=smart
*/tachyon/sites/2/2022/09/verticz-squencz-HAmKh06RZb0-unsplash.jpg?fit=300%2C300
*/tachyon/sites/2/2022/09/verticz-squencz-HAmKh06RZb0-unsplash.jpg?fit=768%2C0
*/tachyon/sites/2/2022/09/verticz-squencz-HAmKh06RZb0-unsplash.jpg?fit=1024%2C590
*/tachyon/sites/2/2022/09/verticz-squencz-HAmKh06RZb0-unsplash.jpg?fit=2048%2C590
Related Issue
https://github.com/humanmade/altis-cms/issues/626 An image renders an incorrect size to what was expected when viewing the editing a post.
The image had no appropriate sizing for the different registered sizes. All registered image sizes were being given the full dimensions of the image but rendered at a different size.
Solution
Ensure that the registered image sizes are applied to the relevant sizes rather than applying the full image dimensions to each registered size. The full dimensions are used as a fallback.