I can see the php code
echo "<img src='$thumb_url' alt />";
if (!empty($thumbnail)) {
$thumb_obj = cws_thumb( $thumbnail, $thumbnail_dims, false );
}
$thumb_url = isset( $thumb_obj[0] ) ? esc_url($thumb_obj[0]) : "";
-
This reply was modified 2 years, 5 months ago by zaiyiqi0604.
-
This reply was modified 2 years, 5 months ago by zaiyiqi0604.
I put some debug code and it show that
thumbnail is https://i0.wp.com/ocake.com.au/wp-content/uploads/2017/12/91476642.jpg?fit=1920%2C1080&ssl=1
thumb_obj is null
thumb_url is null
is that becuase the thumbnail structure is changed so thumb_obj will not get correct result?
could you let me know what is the best way to fix this?
I did try to use php code to rebuild the thumbnail url without i0.wo.com and parameters
It is still not working.
If I set it with static img url will work.
So it looks like Site Accelerator only work with static img url(directly insert the img to post )
Hi @zaiyiqi0604 –
Unfortunately, we aren’t able to provide assistance with custom code as that is outside our scope of support.
Looking at your site, the code appears to be coming from another plugin. I would suggest contacting the developers of cws-portfolio-staff
to see if they have suggestions on how to integrate Jetpack’s Site Accelerator.
Thanks for your response.
I did contact with them, they just simply ask me to turn off CDN.
Is there any other info you can let me know how the CDN pick the url.
I believe already find out the enough information, just not sure how to make CDN pick the url generate by PHP code.
Hi @zaiyiqi0604 –
Unfortunately, we can’t assist further with custom code. We have developer documentation here that you can consult. It is possible that you may find an example there that will help. You can find documentation relating to Site Accelerator here:
https://developer.jetpack.com/module/photon/