Question: I recently switch the base URL of my Wordpress site. My images are all working, but a lot of the thumbnails don't show up in gallery view.

I checked the file paths, and they're correct, but when I enter the url straight into the browser, it goes to the 404 page, and the console is full of 404 errors.

There doesn't seem to be any difference between the images that show and the ones that don't show.

I fixed the permissions and regenerated all thumbnails, but I have the same results.

This is a Wordpress instance running as the blog of a Magento 2 store with the Fishpig integration.

Any ideas?

Thanks

Answer: 
Assuming your directory tree is something like that:

```
SRC
│   script.py
│   chromedriver.exe

```

In your `script.py`, you can:

```
import os

script_dir = os.path.dirname(os.path.realpath(__file__))
executable_path = os.path.join(script_dir, "chromedriver.exe")

```
Use Webdriver manager here <https://pypi.org/project/webdriver-manager/> no need to worry about maintaining required chromedriver.exe file in the path. This will download the required driver specified in the code.