After migrating media library is not showing thumbnails

admin2025-06-04  2

We are currently running a script to migrate from a custom CMS to WordPress. Everything is going perfectly well except for the "media manager".

The media is all stored on a S3 bucket. Here is a sample: CDN_LOCATION/2018/12/13/06/19/22761255000000_original.jpg

We are re-creating the media item and mapping all the thumbnails accordingly and it all works perfectly fine. On the frontend everything loads good and all the different sizes load perfect. On the Admin Panel featured images display correctly.

But the problem is the media manager thumbnail URLs are incorrect and the system automatically adds an additional part on its own disrupting the correct URL:

The additional part automatically takes the folder structure from the original image and implements it on the thumbnails (all we need is to disable this basically).

We are using Offload Media Lite plugin for the S3/CDN.

Below is how the meta is saved which is correct and reflecting on the site.

a:4:{s:4:"file";s:44:"2018/12/13/06/19/22761255000000_original.jpg";s:5:"width";i:880;s:6:"height";i:440;s:5:"sizes";a:7:{s:12:"medium_large";a:4:{s:4:"file";s:42:"2018/12/13/06/19/22777933000000_43_768.jpg";s:5:"width";i:768;s:6:"height";i:576;s:9:"mime-type";s:10:"image/jpeg";}s:5:"large";a:4:{s:4:"file";s:44:"2018/12/13/06/19/22767710000000_169_1024.jpg";s:5:"width";i:1024;s:6:"height";i:576;s:9:"mime-type";s:10:"image/jpeg";}s:10:"in_article";a:4:{s:4:"file";s:43:"2018/12/13/06/19/22766657000000_169_960.jpg";s:5:"width";i:960;s:6:"height";i:540;s:9:"mime-type";s:10:"image/jpeg";}s:5:"small";a:4:{s:4:"file";s:42:"2018/12/13/06/19/22770802000000_43_192.jpg";s:5:"width";i:192;s:6:"height";i:144;s:9:"mime-type";s:10:"image/jpeg";}s:9:"thumbnail";a:4:{s:4:"file";s:42:"2018/12/13/06/19/22769797000000_43_160.jpg";s:5:"width";i:160;s:6:"height";i:120;s:9:"mime-type";s:10:"image/jpeg";}s:6:"medium";a:4:{s:4:"file";s:42:"2018/12/13/06/19/22771810000000_43_240.jpg";s:5:"width";i:240;s:6:"height";i:180;s:9:"mime-type";s:10:"image/jpeg";}s:11:"v-rectangle";a:4:{s:4:"file";s:42:"2018/12/13/06/19/22771810000000_43_240.jpg";s:5:"width";i:240;s:6:"height";i:180;s:9:"mime-type";s:10:"image/jpeg";}}}40

and this is the rest of the metadata:

Can anyone help let us know what are we doing wrong? How can I tell media library not to randomly add this bit of code? Funny enough when we click on it and go to the actual media the path and URL on the right are correct but again the large image has the exact same problem where it chooses to add that addition to it.

转载请注明原文地址:http://conceptsofalgorithm.com/Algorithm/1748977019a315320.html

最新回复(0)