Skip to content

Site crashes when uploading a video #1957

Open
@westonruter

Description

@westonruter

From a support forum topic for Image Placeholders:

My server runs on an AMD Athlon 3000G CPU with 6GB of RAM. It is not a high-performance server, but it is not extremely low-end either. However, after installing the Image Placeholders plugin, my site crashes whenever I upload a video.

After investigating, I found that ffmpeg runs during video uploads, consuming all available resources. I later discovered that this happens because the plugin tries to analyze the dominant color of the video.

I can understand extracting a dominant color from images, but doing so for videos seems unnecessary and unwanted. Moreover, this behavior is not clearly documented, making it difficult to identify the cause of the issue.

I would appreciate it if you could improve this.
The best solution, in my opinion, would be for the plugin to ignore video files entirely.
If that is not feasible, please consider adding an option to disable this feature in the settings.

Thank you for your consideration.

Activity

added
[Plugin] Image PlaceholdersIssues for the Image Placeholders plugin (formerly Dominant Color Images)
[Type] BugAn existing feature is broken
on Mar 26, 2025
moved this to Not Started/Backlog 📆 in WP Performance 2025on Mar 26, 2025
kartikmehta8

kartikmehta8 commented on Apr 1, 2025

@kartikmehta8

Hi, I'm a bit new to the performance plugin but I would like to work on this.

cc: @westonruter @sarthak-19

sarthak-19

sarthak-19 commented on Apr 1, 2025

@sarthak-19
Contributor

Hi @kartikmehta8 welcome to the wp-performance community.
Please feel free to reach out in case you have any query regarding the contribution.

kartikmehta8

kartikmehta8 commented on Apr 2, 2025

@kartikmehta8

Hi @westonruter!

  • I am thinking of adding a settings field where a user can check/uncheck if they want to process the videos as well or not.
  • Another approach I am thinking of is giving a field where the user can input the extensions they want to ignore and don't want to process.
  • Or, if we don't want a settings field, then the only way is to hardcode and ignore the videos in the code itself.

What do you think? I feel approaches 1 and 2 are a bit cleaner and should be implemented. Do let me know your thoughts.

westonruter

westonruter commented on Apr 2, 2025

@westonruter
MemberAuthor

Hello!

  • Or, if we don't want a settings field, then the only way is to hardcode and ignore the videos in the code itself.

I think this is the right approach. I'm not clear on how our plugin is responsible here in the first place, but if we're somehow calling ffmpeg as part of the image conversion process, we definitely shouldn't be doing this when a video is uploaded.

cc @adamsilverstein

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

Metadata

Metadata

Assignees

Labels

[Plugin] Image PlaceholdersIssues for the Image Placeholders plugin (formerly Dominant Color Images)[Type] BugAn existing feature is broken

Type

No type

Projects

Status

Not Started/Backlog 📆

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    Site crashes when uploading a video · Issue #1957 · WordPress/performance