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

Hard-coded image references should be dynamic #30

Open
DavidAJohn opened this issue Jul 19, 2024 · 1 comment
Open

Hard-coded image references should be dynamic #30

DavidAJohn opened this issue Jul 19, 2024 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@DavidAJohn
Copy link
Owner

While updating the application to remove references to images stored on ImgBB.com, it's become abundantly clear that simply replacing one set of hard-coded values for image references with another set is not an ideal solution.

I think it's safe to assume that Azure is going to be more reliable than imgbb.com, but this is more about providing flexibility regarding the hosting of static file assets.

I'd like to have a base URI stored in the config so that wherever possible we're just storing the image name and adding it as a suffix to the base URI. That would make it possible to host the images somewhere other than Azure, and to switch hosts more easily if necessary.

There are implications for a number of different parts of the application, but they can be dealt with gradually rather than all in one go.

The immediate problem of hard-coded refs to imgbb.com has been dealt with now at least.

@DavidAJohn DavidAJohn added the enhancement New feature or request label Jul 19, 2024
@DavidAJohn DavidAJohn self-assigned this Jul 19, 2024
@DavidAJohn
Copy link
Owner Author

Hard-coded references to the Azure storage container being used to store the images displayed throughout the application have now mostly been removed, with the following exceptions:

  • The ApplicationStatus project has a reference in its custom.css stylesheet. This may have to remain in place.
  • The products.json file used for data seeding in the Products API project.

There are obviously references contained in the Blazor appsettings files and the live .env file would need to contain the same reference. This is by design.

Ultimately, the goal is to make it possible to just change the value in the .env file and have that override the values in each containerised application. The docker-compose file has also been configured to support this.

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

No branches or pull requests

1 participant