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

Honor Source Image Path in Image Cache #1386

Closed
bhsmither opened this issue Dec 7, 2016 · 3 comments
Closed

Honor Source Image Path in Image Cache #1386

bhsmither opened this issue Dec 7, 2016 · 3 comments

Comments

@bhsmither
Copy link
Contributor

See: https://forums.cubecart.com/topic/51944-where-are-the-whole-cache-of-imeges-located/

Feature Request: when rendering sized derivatives of source images, keep in play the path to the source image (as specified in CubeCart_filemanager.filepath) and establish the same path in the /images/cache/ folder.

This (probably) will prevent identical filename collisions, and enable better management within some (unreasonable) hosting environments - not that /images/cache/ should ever need external management.

@Dirty-Butter
Copy link

Now that 6.1.2 allows admin to upload images to folders on the product listing Image tab - there's a good incentive to create/move images to folders. Sounds like maintaining the folder structure in cache would speed things up even more!

@bhsmither
Copy link
Contributor Author

My diagnostics show that this is already the desired behavior.

Use the File Manager, I moved an image from / (which is in reality /images/source/) to /test/ (a folder that already exists which is in reality /images/source/test/). The database was updated accordingly.

However, in making this "move", the rendered cached images were not affected.

I manually deleted the rendered images from the /cache/images/ folder.

I then called for the product's page.

The code tracing showed that the path for this image carried over to the function that creates the rendered images if they do not already exist. Thus, I have the set in a matching folder, for example, /images/cache/test/prod7.##.png.

So, I think there is nothing to do here.

@abrookbanks
Copy link
Member

Thanks Brian. The images/cache folder should indeed respect images/source subfolders.

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

No branches or pull requests

3 participants