humanmade / asset-manager-framework

A framework for overriding the WordPress media library with an external asset provider, such as a DAM
GNU General Public License v2.0
155 stars 7 forks source link

Improve duplicate URL base fixing function #36

Closed roborourke closed 3 years ago

roborourke commented 3 years ago

Uses regex to only match the last instance of http:// or https:// onwards, in some cases the attachment guid could be different to the individual attachment metadata sizes file name - which for AMF assets are fully qualified URLs. This means the intermediate size URLs do not need to match the original asset URL path.