picturefill.js.wp icon indicating copy to clipboard operation
picturefill.js.wp copied to clipboard

plugin only working on localhost:8888

Open nin808 opened this issue 11 years ago • 2 comments

First let me say thanks for making a great plugin. I've got everything set up and working just how I want it with custom sizes and srcsets, even working with the ACF plugin. But I'm having one major problem: the plugin is only loading in an image's sizes and srcset when I have my WordPress URL set to localhost:8888.

In my template, since I'm calling an image that is set up using ACF, I have the following code:

http://pastebin.com/GY8Bkbhc

When the Wordpress URL is set to localhost:8888, the following code is output by the plugin:

http://pastebin.com/8Mf8sp7R

As I resize my browser window in Safari, the src attribute updates with the most appropriate image so I know it's working. In Chrome it includes the full srcset attribute, and by checking the resources loaded I can see it also loading in only the correct image.

However, I'm using MAMP and in order to share the site across my LAN, I need to update the URL to my IP (192.168.0.6:8888). When I do this, everything works fine and the site loads in all of the images, but instead of having a srcset and sizes attribute, it only has the src fallback, title, and class attributes. The output looks like:

http://pastebin.com/4DMF2s6N

So I can see the URL is updating to the correct address, but it's not loading in any sizes or srcset and only loading a single image.

I've deactivated and reactivated the plugin to clear it's cache thinking that could be the issue, but still it does not work. If I set the WordPress URL back to localhost:8888, then everything works fine again.

Any thoughts?

nin808 avatar Dec 03 '14 19:12 nin808

My apologies for the multiple updates to my issue. GitHub noob here and I was having trouble getting my gists working.

nin808 avatar Dec 03 '14 19:12 nin808

Most likely this is the culprit: https://github.com/kylereicks/picturefill.js.wp/issues/58

tychay avatar Apr 24 '15 02:04 tychay