Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

plugin only working on localhost:8888 #52

Open
nin808 opened this issue Dec 3, 2014 · 2 comments
Open

plugin only working on localhost:8888 #52

nin808 opened this issue Dec 3, 2014 · 2 comments

Comments

@nin808
Copy link

nin808 commented Dec 3, 2014

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
Copy link
Author

nin808 commented Dec 3, 2014

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

@tychay
Copy link

tychay commented Apr 24, 2015

Most likely this is the culprit: #58

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants