johnnycastrup
Forum Replies Created
-
Forum: Plugins
In reply to: [Easy Instagram] Cached images not renderingHi L12A.
It’s right at the top of the function save_remote_image in the file /wp-content/plugins/easy-instagram/include/class-easy-instagram-cache.php around line 337.
I hope that helps.
Forum: Plugins
In reply to: [Easy Instagram] Cached images not renderingI managed to get it working here by changing how file names are built in the cache function, save_remote_image in the file class-easy-instagram-cache.php.
I replaced the regular expression matching at the top of the function with
$filename = ''; $remote_name = parse_url($remote_image_url, PHP_URL_PATH); $filename .= $id . str_replace('/', '-', $remote_name);
And that does the trick for now. Hopefully that can be helpful.
Forum: Plugins
In reply to: [Easy Instagram] Cached images not renderingI am having the exact same issue, and it started occurring sometime last week. Was reported *before* I upgraded to the latest version, leading me to believe that the root cause might not be in the plugin per se.
Deleting the files and refreshing doesn’t help. The actual image (the .jpg one) works fine. the .2 files also work fine if renamed to have the .jpg extension. They are not corrupted.
My site: https://www.upandaway.dk/ (widget in the sidebar).
Requesting the files directly via http results in a 404 error.There are two %3D (=) entities in the filenames. If I rename files to remove those, they can be served again. Compare (both files are on the server):
https://www.upandaway.dk/wp-content/plugins/easy-instagram/cache/ig_cache_key=MTE1MDc3ODA4ODE3NzgxNjk5Mg%3D%3D_low_resolution.2.jpg
(can’t be served)https://www.upandaway.dk/wp-content/plugins/easy-instagram/cache/ig_cache_key=MTE1MDc3ODA4ODE3NzgxNjk5Mg_low_resolution.2.jpg
(can be served)I have wondered if my hosting provider has upgraded apache, php, regular expressions libraries or some such, but the more I think about it, I think it may be a change in how Instagram names their image assets, that is incompatible with the cache code for this plugin. In particular the regular expression in the save_remote_image() method.
The asset urls currently in use look like
https://scontent.cdninstagram.com/t51.2885-15/s640x640/sh0.08/e35/12627841_177308709308653_1951251718_n.jpg?ig_cache_key=MTE4MzYwNjgxMTQ0MDQ2OTY4MA%3D%3D.2