Photon is stripping out video embed code in 2.1.1
-
I recently updated Jetpack to version 2.1.1 and noticed that when I have Photon turned on, some videos are displaying smaller than usual. I looked at the source code and saw that the height/width properties of the embed code were getting stripped out. What’s weird is that this isn’t happening on every video embed, just some. Any idea what’s going on? Here are some examples:
Normal video embed:
http://batman-news.com/2012/12/20/the-dark-knight-rises-was-2012s-most-viewed-movie-trailer/Small video embed:
http://batman-news.com/2012/12/17/batman-the-dark-knight-returns-part-2-blu-ray-details/If I deactivate Photon, that second example will go back to its original size (600×338) and the width/height will be restored in the source code.
-
Also (I’m not sure if this is related) Photon seems to be skipping some images now with the latest update. For example, the first image of Bane in this post isn’t being served through Photon:
http://batman-news.com/2012/12/31/the-dark-knight-rises-the-biggest-stories-of-2012/
but if you go to the homepage (http://batman-news.com/) and view the image (it’s about the 3rd article down) it is being served with Photon.
when I have Photon turned on, some videos are displaying smaller than usual.
Do you use shortcodes to embed your videos, or do you paste the youtube URL on a separate line?
Photon seems to be skipping some images now with the latest update
I noticed that you used your own CDN to serve this image. When you deactivate your CDN and serve all images through WordPress and Photon, do you still experience the issue?
Do you use shortcodes to embed your videos, or do you paste the youtube URL on a separate line?
I typically just copy the embed code from YouTube. This is what I’m using in the example with the small video:
<iframe width="600" height="338" src="http://www.youtube.com/embed/0zhWpgvmnYE?rel=0" frameborder="0" allowfullscreen></iframe>
I noticed that you used your own CDN to serve this image. When you deactivate your CDN and serve all images through WordPress and Photon, do you still experience the issue?
I just disabled my CDN, but the photo still isn’t being served by Photon:
http://batman-news.com/2012/12/31/the-dark-knight-rises-the-biggest-stories-of-2012/If it helps, these problems started happening with the new 2.1 update. Thanks!
Here’s another example of the video width/height getting stripped out with Photon active:
http://techyourworld.com/2013/01/subyou/<a class='sublime' href=''><img src="http://i0.wp.com/techyourworld.com/wordpress/wp-content/uploads/2012/06/10.jpg?resize=625%2C247" alt="10" class="alignnone size-full wp-image-4640" /></a><video class='sublime zoom' style='display:none;' preload='none' data-settings='youtube-id:J9DlV9qwtF0' > </video> <a class='sublime' href=''><img src="http://i0.wp.com/techyourworld.com/wordpress/wp-content/uploads/2012/06/10.jpg?resize=625%2C247" alt="10" class="alignnone size-full wp-image-4640" data-recalc-dims="1" /></a><video class='sublime zoom' style='display:none;' width='1280' height='720' preload='none' data-settings='youtube-id:z5Humz3ONgk' > </video>
In the source code, the width and height attribute are gone in the first video tag. But when I deactivate Photon they come back.
I tried to reproduce the issue with the same video on a test blog of mine, but I get standard size videos in all cases:
- when copying the embed code from Youtube:
<iframe width="600" height="338" src="http://www.youtube.com/embed/0zhWpgvmnYE?rel=0" frameborder="0" allowfullscreen></iframe>
- When using WordPress oEmbed feature and pasting the video URL on a separate line:
http://www.youtube.com/watch?feature=player_embedded&v=0zhWpgvmnYE
- When using Jetpack Video shortcode:
[youtube=http://www.youtube.com/watch?v=0zhWpgvmnYE&w=600&h=338]
Could you copy the contents of the Text tab in your post editor, like so:
- Open an affected post in the editor.
- Switch to the text tab for the editor.
- Reload the page.
- Copy the post content into Pastebin.
You can then post the pastebin here, or send it to us via this contact form:
http://en.support.wordpress.com/contact/?jetpack=needs-serviceIt could help me understand why I can’t reproduce the issue on my test blog.
Thanks!
Sure, here it is:
http://pastebin.com/u00WjLtjIt’s weird because it seems random, I don’t notice a pattern.
This post displays fine:
http://batman-news.com/2012/12/20/the-dark-knight-rises-was-2012s-most-viewed-movie-trailer/But Photon strips the width/height properties out of this post, causing the video to be smaller:
http://batman-news.com/2012/12/17/batman-the-dark-knight-returns-part-2-blu-ray-details/The same thing is happening with Photon not serving images for some posts. Photon works fine on the main image here:
http://batman-news.com/2013/01/07/michael-keaton-wanted-batman-forever-to-be-more-like-batman-begins/but Photon isn’t serving the main photo here:
http://batman-news.com/2012/12/31/the-dark-knight-rises-the-biggest-stories-of-2012/This all was introduced in the 2.1 Jetpack update. Thanks for looking into it, hopefully we can track down the issue.
Thanks for all the additional details! We’ll have a look at it and keep you updated as soon as we can address the issue.
Thanks again for all the reports. We have now fixed the issue:
http://plugins.trac.wordpress.org/changeset/651158The fix will be available in the next Jetpack release.
That’s great, thanks!
Should I open a new thread for the issue of Photon not being used on some posts?
My bad, I missed that second issue of yours.
We would need a bit more information about this. Could you do the following:
- Open an affected post in the editor.
- Switch to the text tab for the editor.
- Reload the page.
- Copy the post content into Pastebin.
- Post the Pastebin URL here, and send it to us via email: http://en.support.wordpress.com/contact/?jetpack=needs-service
Thanks!
No problem, here’s some more info:
Photon works in this post:
http://batman-news.com/2013/01/07/michael-keaton-wanted-batman-forever-to-be-more-like-batman-begins/Here’s the content from the post screen:
http://pastebin.com/ktMfgBFyPhoton is not working in this post:
http://batman-news.com/2012/12/12/possible-batman-cameo-in-man-of-steel-christopher-nolan-wont-deny-it/Here’s the content from the post screen:
http://pastebin.com/SZgdktL0Unfortunately I don’t notice a pattern. There are a lot of posts where Photon works fine, but many others where it’s simply not serving up images. This issue popped up in the 2.1 update.
Thanks! We’ll have a look at it.
Could you post a list of the active plugins on your site, so we can see if any of them could conflict with Photon?
Sure, here they are:
AddThis Social Bookmarking Widget 3.0.2
Better Recent Posts Widget 1.1.4
Chartbeat 1.4
Contact Form 7 3.3.2
Digg Digg 5.3.0
Disqus Comment System 2.74
Fanciest Author Box 1.0
Google Analytics for WordPress 4.2.8
Jetpack by WordPress.com 2.1.1
MCE Table Buttons 2.0
MediaElement.js – HTML5 Audio and Video 2.9.1
NextGEN Gallery 1.9.10
NextGEN Gallery Optimizer 1.1.2
nrelate Related Content 0.51.4
Photo Galleria 0.5.1
Polldaddy Polls & Ratings 2.0.17
Simple Image Size 2.3.1
SublimeVideo – HTML5 Video Player 1.5.2
W3 Total Cache 0.9.2.5
Widget Logic 0.56
WordPress SEO 1.3.4.3
WP HTML Author Bio 1.0
wpSpoiler 1.2
WP to Twitter 2.5.5Could you try to disable your CDN again, as well as W3 Total Cache? We tried to reproduce the issue, and we think the problem might be linked to the way W3 Total Cache handles CDN rewrites.
Thanks!
Hey Jeremy,
Unfortunately my host doesn’t allow me to disable W3 Total Cache. I don’t think it’s an issue with the CDN because Photon works on all images except for that main image on my single posts. The same image that doesn’t work on single posts, works great with Photon on the home page. This was introduced with the 2.1 Jetpack update, in previous versions Photon worked fine throughout my entire site.
I really appreciate all off your help, but I think I’m going to disable Photon for a few weeks. I’m switching to a new WordPress theme in early February so I’ll activate Photon again once that’s installed and see if it works properly. I’ll create a new thread if I continue to have a problem.
Thanks again, and thanks for even offering a service like Photon. That’s the feature that got me to install Jetpack. Having a free, fast CDN and the ability to serve up Retina images is a huge plus for a website owner like me!
- when copying the embed code from Youtube:
- The topic ‘Photon is stripping out video embed code in 2.1.1’ is closed to new replies.