TMI poop pic

My almost 2 year old went to the bathroom this morning and when I went to flush it down the toilet I noticed there was blood in it. She hasn’t had anything with red in it lately. What could cause this? Also, we are battling getting her poop back on track so sometimes she is consipated and sometimes she isn’t so it comes out hard. Could it be from straining?